Browse Source
This file is used to start the program at startup. It, also, restarts the program if it crashes or throws an exception. The usual scenario which causes the program to crash is the 'max. requests exceeded' exception in the 'requests' module (Python). When that happens, this 'restart' service has a 60 seconds wait period -- which acts as a 'backoff' period. You will need to copy the .service file to the appropriate systemd location, 'daemon-reload' systemctl, enable the service and start the service. You will need to look-up how to do that -- this info. is beyond the scope of this commmit.unstable
rtrp@factory1
3 years ago
1 changed files with 16 additions and 0 deletions
@ -0,0 +1,16 @@
|
||||
[Unit] |
||||
Description=Light-Meter service for Return to Ritherdon project by Nicola Ellis |
||||
After=network.service |
||||
|
||||
[Service] |
||||
Type=simple |
||||
ExecStart=bash /home/rtrp/repos/light-meter/startup.sh |
||||
WorkingDirectory=/home/rtrp/repos/light-meter |
||||
StandardOutput=inherit |
||||
StandardError=inherit |
||||
Restart=always |
||||
RestartSec=60 |
||||
user=rtrp |
||||
|
||||
[Install] |
||||
WantedBy=multi-user.target |
Reference in new issue