summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2026-03-17 11:56:44 +0100
committerYuval Adam <_@yuv.al>2026-03-17 11:56:44 +0100
commit193048e1e40ab0820c4525c439efaafcaa2d2e6e (patch)
tree251404de5fdf7b0fafcc725ab9be6a5bd822b079
parente97d3ae12b04745e785311d9125261557ac21fd3 (diff)
Add systemd unit for running weather-board on boot
Install with: sudo cp weather-board.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable --now weather-board
-rw-r--r--weather-board.service17
1 files changed, 17 insertions, 0 deletions
diff --git a/weather-board.service b/weather-board.service
new file mode 100644
index 0000000..c85d3af
--- /dev/null
+++ b/weather-board.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Weather Board MQTT publisher for Home Assistant
+After=network-online.target
+Wants=network-online.target
+
+[Service]
+Type=simple
+User=yuval
+WorkingDirectory=/home/yuval/dev/weather-station
+ExecStart=/usr/bin/python3 /home/yuval/dev/weather-station/mqtt_ha.py
+Restart=on-failure
+RestartSec=10
+StandardOutput=journal
+StandardError=journal
+
+[Install]
+WantedBy=multi-user.target