From 193048e1e40ab0820c4525c439efaafcaa2d2e6e Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Tue, 17 Mar 2026 11:56:44 +0100 Subject: 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 --- weather-board.service | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 weather-board.service 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 -- cgit v1.3.1