add receiver service
This commit is contained in:
@@ -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
|
||||||
Reference in New Issue
Block a user