setting up service

This commit is contained in:
2026-08-22 09:33:48 +02:00
parent 4d04d961a3
commit 8a44eb8dc8
2 changed files with 4 additions and 6 deletions
+2 -4
View File
@@ -442,11 +442,9 @@ To run it automatically as a user service, copy the supplied service file. It
assumes this repository is located at `$HOME/service_zigbee`:
```bash
mkdir -p "$HOME/.config/systemd/user"
cp zigbee-rrd.service.example "$HOME/.config/systemd/user/zigbee-rrd.service"
cp zigbee-sensor.service.example /etc/systemd/system
systemctl --user daemon-reload
systemctl --user enable --now zigbee-rrd.service
sudo loginctl enable-linger "$USER"
systemctl --user enable --now zigbee-sensor.service
```
Inspect its status and live logs with:
@@ -5,8 +5,8 @@ After=network-online.target
[Service]
Type=simple
WorkingDirectory=%h/service_zigbee
ExecStart=%h/service_zigbee/.venv/bin/python %h/service_zigbee/read_temperature.py
WorkingDirectory=/opt/service_zigbee
ExecStart=/opt/service_zigbee/.venv/bin/python /opt/service_zigbee/read_temperature.py
Restart=on-failure
RestartSec=15