2021-10-19 18:01:32 -07:00
|
|
|
[Unit]
|
2022-12-05 09:58:23 -08:00
|
|
|
Description=PiSCSI-OLED Monitor service
|
|
|
|
After=network.target piscsi.service
|
2021-10-19 18:01:32 -07:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
Restart=always
|
2021-12-19 15:50:03 -08:00
|
|
|
RestartSec=2s
|
2022-12-05 09:58:23 -08:00
|
|
|
ExecStart=/home/pi/piscsi/python/oled/start.sh
|
|
|
|
ExecStop=/bin/pkill --signal 2 -f "python3 src/piscsi_oled_monitor.py"
|
2021-12-19 15:50:03 -08:00
|
|
|
# Sleep 2s as a crude way for the python interrupt handler to take effect and show the shutdown splash
|
2021-10-24 19:13:32 -07:00
|
|
|
ExecStop=/bin/sleep 2
|
2022-12-05 09:58:23 -08:00
|
|
|
SyslogIdentifier=PISCSIMON
|
2021-10-19 18:01:32 -07:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|