This commit is contained in:
2025-12-16 18:52:09 +02:00
commit f462fec86f
5 changed files with 250 additions and 0 deletions

20
serial-heartbeat.service Normal file
View File

@@ -0,0 +1,20 @@
[Unit]
Description=Serial heartbeat responder
After=network.target
[Service]
Type=notify
NotifyAccess=all
Environment=PYTHONUNBUFFERED=1
Environment=SERIAL_PORT=/dev/ttyUSB0
Environment=SERIAL_BAUDRATE=9600
ExecStart=/usr/bin/env python3 /opt/watch-watch-server/serial_heartbeat.py --port ${SERIAL_PORT} --baudrate ${SERIAL_BAUDRATE}
Restart=on-failure
RestartSec=3
WatchdogSec=20
WorkingDirectory=/opt/watch-watch-server
StandardOutput=journal
StandardError=inherit
[Install]
WantedBy=multi-user.target