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