fix: move StartLimitIntervalSec/Burst to [Unit] for older systemd compat
Older systemd (< 230, common on Pi OS Buster/Bullseye) rejects these keys in [Service] with 'Unknown key' warning and ignores them, meaning no restart rate-limiting was enforced. Also includes pi-setup.sh fix for hardcoded user/home from previous session.
This commit is contained in:
@@ -6,6 +6,9 @@ After=network-online.target
|
|||||||
Wants=network-online.target
|
Wants=network-online.target
|
||||||
# Publish an MQTT alert if systemd gives up restarting (StartLimitBurst exceeded).
|
# Publish an MQTT alert if systemd gives up restarting (StartLimitBurst exceeded).
|
||||||
OnFailure=infoscreen-notify-failure@%n.service
|
OnFailure=infoscreen-notify-failure@%n.service
|
||||||
|
# StartLimit* must live in [Unit] for compatibility with older systemd (< 230).
|
||||||
|
StartLimitIntervalSec=60
|
||||||
|
StartLimitBurst=5
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
# notify: simclient sends READY=1 via sd_notify once fully initialised.
|
# notify: simclient sends READY=1 via sd_notify once fully initialised.
|
||||||
@@ -33,12 +36,6 @@ ExecStart=/home/olafn/infoscreen-dev/scripts/start-simclient.sh
|
|||||||
# publishes completed — closing the lifecycle cleanly.
|
# publishes completed — closing the lifecycle cleanly.
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
|
|
||||||
# Prevent rapid restart thrash: allow at most 5 restarts in 60 seconds.
|
|
||||||
StartLimitIntervalSec=60
|
|
||||||
StartLimitBurst=5
|
|
||||||
|
|
||||||
# Logging
|
|
||||||
StandardOutput=journal
|
StandardOutput=journal
|
||||||
StandardError=journal
|
StandardError=journal
|
||||||
SyslogIdentifier=infoscreen-simclient
|
SyslogIdentifier=infoscreen-simclient
|
||||||
|
|||||||
Reference in New Issue
Block a user