Well, that seems really fun to work on.
And it’s really great to hear your daughter has an interesting passion. That’s awesome!
Regarding the other issue you’ve brought the word about, I think you can easily do it by creating a service and enabling it with
systemd to run on boot.
Here’s what you have to do:
Use the following template to write your
unit file - that’s how it’s called.
Description=My application name
Give this filename a name following this template:
Please, keep in mind that the extension must be
Copy paste the file to
/etc/systemd/system/ folder. You’ll need to use
sudo for it.
From within the terminal type the following commands:
sudo systemctl daemon-reload
// reloads all the unit files - including our recently added one
sudo systemctl enable mywebservice.service
// enables the service -> it will make the app start on boot
sudo systemctl start mywebservice.service
// enter this command so that you don't have to reboot
// in order for the service to get started
Also, if you wish to disable the service use the
sudo systemctl disable myservice.service.
If you wish to update the
systemd with new changes brought to the
unit file use
sudo systemctl daemon-reload.
And for stopping the service use
sudo systemctl stop myservice.service.
Now, whenever the
Raspberry Pi boots up, your program found at
/path/to/my/python/app.py will get launched.
If the app fails to run, or during its operation it stops, it gets restarted after
2 seconds, no matter what.
If you want to restart the server and bring new changes that you’ve been working on, you can issue the following command:
sudo systemctl restart mywebservice.service
Hope this will get the software up and running for the next week, on hobby day.