-
Notifications
You must be signed in to change notification settings - Fork 1
/
assistant.service
34 lines (30 loc) · 921 Bytes
/
assistant.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
[Unit]
Description=assistant-service-of-home-air-quality-and-assistant
After=graphical.target
After=network.target
# Hopefully it should be enforced: https://github.com/systemd/systemd/issues/5097
Wants=time-sync.target
[Service]
Environment=DISPLAY=:0
Environment=XAUTHORITY=/home/pi/.Xauthority
Environment=PYTHONUNBUFFERED=true
ExecStart=python3 assistant.py
WorkingDirectory=/home/pi/home-air-quality-and-assistant/assistant
StandardOutput=inherit
StandardError=inherit
User=pi
StartLimitInterval=5min
StartLimitBurst=5
Restart=always
RestartSec=120s
TimeoutSec=infinity
TimeoutStartSec=120s
TimeoutStopSec=20s
# Turn it on only when you are absolutely and positively sure that this service works tip-top, otherwise you may experience reboot loop
#StartLimitAction=reboot
# Watchdog unleashed. The value must not be lower than ~30s
WatchdogSec=60s
Type=notify
NotifyAccess=all
[Install]
WantedBy=graphical.target