archy/image-recipe/configs/archipelago-kiosk.service

23 lines
890 B
SYSTEMD
Raw Normal View History

[Unit]
Description=Archipelago Kiosk (X11 + Chromium)
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
Conflicts=getty@tty1.service
[Service]
Type=simple
# Wait up to 120s for archipelago to serve /health. On first boot it
# can take longer than 30s — the backend initialises state, unbundled
# ISO pulls FileBrowser, and the frontend dist has to settle. The
# previous 30s cap was firing Chromium at a not-yet-ready backend and
# the resulting blank window only recovered on reboot.
ExecStartPre=/bin/bash -c 'for i in $(seq 1 60); 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
TimeoutStartSec=180
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target