service unit

This commit is contained in:
Alex 2024-06-16 16:37:37 +03:00
parent fcc02da845
commit f8aed654b9
2 changed files with 12 additions and 1 deletions

View file

@ -14,4 +14,5 @@
## Running
* `prettyprint.py` -- check and print all sensors
* TODO -- launch service
* `service.py` -- launch service
* `lego-monitoring.service` is a systemd unit that starts `service.py`

10
lego-monitoring.service Normal file
View file

@ -0,0 +1,10 @@
[Unit]
After=docker.service
[Service]
ExecStart=/opt/lego-monitoring/.venv/bin/python /opt/lego-monitoring/service.py
Type=exec
Restart=always
[Install]
WantedBy=multi-user.target