2026-03-12 00:19:30 +00:00
|
|
|
[Unit]
|
|
|
|
|
Description=Archipelago Kiosk (X11 + Chromium)
|
2026-04-19 09:54:12 -04:00
|
|
|
After=archipelago.service systemd-user-sessions.service network-online.target
|
|
|
|
|
Wants=archipelago.service network-online.target
|
2026-03-12 12:56:59 +00:00
|
|
|
ConditionPathExists=/usr/local/bin/archipelago-kiosk-launcher
|
2026-03-12 00:19:30 +00:00
|
|
|
Conflicts=getty@tty1.service
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
Type=simple
|
2026-04-19 18:09:46 -04:00
|
|
|
# Wait up to 5 min for archipelago to serve /health. On slow hardware
|
|
|
|
|
# first-boot is dominated by the FileBrowser pull (unbundled ISO),
|
|
|
|
|
# initial archipelago state sync, and frontend settle — .198 took
|
|
|
|
|
# longer than 120s and chromium launched against an empty backend,
|
|
|
|
|
# producing a white window that only recovered on reboot. 300s gives
|
|
|
|
|
# slow-but-functional hardware enough headroom; TimeoutStartSec is
|
|
|
|
|
# bumped in lockstep so systemd doesn't kill us mid-wait.
|
|
|
|
|
ExecStartPre=/bin/bash -c 'for i in $(seq 1 150); do curl -sf http://localhost/health >/dev/null 2>&1 && break; sleep 2; done'
|
2026-03-12 12:56:59 +00:00
|
|
|
ExecStart=/usr/local/bin/archipelago-kiosk-launcher
|
2026-04-19 18:09:46 -04:00
|
|
|
TimeoutStartSec=360
|
2026-03-12 00:19:30 +00:00
|
|
|
Restart=always
|
|
|
|
|
RestartSec=5
|
|
|
|
|
|
2026-06-16 11:10:26 -04:00
|
|
|
# Resource guardrail (#36). On GPU-less / headless hardware chromium could spin
|
|
|
|
|
# software compositing at ~92% of a core, saturating the node and starving the
|
|
|
|
|
# backend (it caused the .198 receive timeout + deploy storms). Cap CPU + memory
|
|
|
|
|
# so a runaway kiosk can never take the whole machine down; Delegate so the cap
|
|
|
|
|
# also binds the chromium/Xorg children in this unit's cgroup.
|
|
|
|
|
Delegate=yes
|
|
|
|
|
CPUQuota=75%
|
|
|
|
|
MemoryMax=1500M
|
|
|
|
|
MemoryHigh=1200M
|
|
|
|
|
|
2026-03-12 00:19:30 +00:00
|
|
|
[Install]
|
|
|
|
|
WantedBy=multi-user.target
|