add receiver service

This commit is contained in:
2026-06-20 11:37:23 +08:00
parent ec690049b9
commit f15f8150ac
@@ -0,0 +1,26 @@
[Unit]
Description=Weather Station Serial Receiver
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=root
WorkingDirectory=/home/arch/script/weather-station-receive
ExecStart=/bin/bash /home/arch/script/weather-station-receive/receive.sh
# 自动重启
Restart=always
RestartSec=10
# 防止无限重启:60 秒内超过 3 次则停止
StartLimitInterval=60
StartLimitBurst=3
# 日志输出到 journald
StandardOutput=journal
StandardError=journal
SyslogIdentifier=weather-station
[Install]
WantedBy=multi-user.target