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:
RobbStarkAustria
2026-04-05 09:15:55 +02:00
parent fa7efae346
commit 3230ec5bb4

View File

@@ -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