Added a system service

This commit is contained in:
2026-03-19 23:20:13 +01:00 Verified
parent 34a5582b58
commit bf3c6595ac
2 changed files with 59 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
# weather-station@.service
[Unit]
Description=E-Ink Weather Station Daemon
After=network-online.target
Wants=network-online.target
[Service]
User=%i
Group=%i
WorkingDirectory=/home/%i/weather-station
ExecStart=/home/%i/weather-station/.venv/bin/python /home/%i/weather-station/main.py
# Auto-restart logic
Restart=always
RestartSec=10
Environment=PYTHONUNBUFFERED=1
[Install]
WantedBy=multi-user.target