Fix clignotement : verrou instance unique kiosk + meta notranslate HTML
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
||||
<title>Photobooth</title>
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
|
||||
<meta name="google" content="notranslate">
|
||||
<meta http-equiv="Content-Language" content="fr">
|
||||
<link rel="stylesheet" href="/css/style.css">
|
||||
<link rel="stylesheet" href="/css/themes.css">
|
||||
</head>
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Verrou : une seule instance autorisée
|
||||
LOCK=/tmp/photobooth-kiosk.lock
|
||||
if [ -f "$LOCK" ] && kill -0 "$(cat $LOCK)" 2>/dev/null; then
|
||||
echo "[kiosk] Déjà en cours (pid $(cat $LOCK)), abandon."
|
||||
exit 0
|
||||
fi
|
||||
echo $$ > "$LOCK"
|
||||
trap "rm -f $LOCK" EXIT
|
||||
|
||||
xset s off
|
||||
xset -dpms
|
||||
xset s noblank
|
||||
@@ -15,14 +25,13 @@ _backend_loop() {
|
||||
}
|
||||
_backend_loop &
|
||||
|
||||
# Attendre que le backend soit prêt
|
||||
# Attendre que le backend soit prêt (max 15s)
|
||||
for i in $(seq 1 15); do
|
||||
curl -sf http://localhost/ > /dev/null 2>&1 && break
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Chromium en boucle : redémarre automatiquement s'il plante ou se ferme
|
||||
# Attend si la photostation est en cours d'exécution
|
||||
# Chromium en boucle : redémarre s'il plante, attend si photostation active
|
||||
while true; do
|
||||
while [ -f /tmp/photostation_running ]; do sleep 1; done
|
||||
chromium \
|
||||
|
||||
Reference in New Issue
Block a user