Watchdog systemd + fix stabilité kiosk/backend

- Watchdog (30s) : vérifie backend, caméra, chromium, tue les orphelins,
  reboot auto après 10 échecs consécutifs (~5min sans service)
- kiosk-session.sh : tue les backends orphelins au démarrage, trap EXIT
  pour cleanup quand le kiosk est tué
- camera.py : force release USB avec timeout 2s quand connecter() échoue
- main.py : uvicorn.run(app) au lieu de string pour éviter double import

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-27 13:21:02 +02:00
parent 29e65ab1bd
commit 3c3dbd6c8b
6 changed files with 144 additions and 28 deletions

10
scripts/watchdog.timer Normal file
View File

@@ -0,0 +1,10 @@
[Unit]
Description=Photobooth watchdog timer
[Timer]
OnBootSec=60
OnUnitActiveSec=30
AccuracySec=5
[Install]
WantedBy=timers.target