jimbo
New Member
Posts: 1
|
Post by jimbo on Jul 26, 2019 17:36:54 GMT -8
This is awesome! But, I'd really like to just set it and forget it (in a headless fashion). How can I get the SGS program to start automatically if the pi should reboot?
J
|
|
|
Post by SDL on Jul 27, 2019 7:27:46 GMT -8
put it in /etc/rc.local
Edit the file:
sudo nano /etc/rc.local
Put this in at the end of the file
cd /home/pi/SDL_Pi_SmartGardenSystem nohup sudo SGS.py &
Reboot your computer and SGS will be running in the background.
You will now have a nohup.out file in /home/pi/SDL_Pi_SmartGardenSystem that contains all the console output.
Stopping it can be done by killing the process or commenting out the lines (using "#") in /etc/rc.local and rebooting.
BP
|
|