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">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
||||||
<title>Photobooth</title>
|
<title>Photobooth</title>
|
||||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
|
<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/style.css">
|
||||||
<link rel="stylesheet" href="/css/themes.css">
|
<link rel="stylesheet" href="/css/themes.css">
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -1,4 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/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 s off
|
||||||
xset -dpms
|
xset -dpms
|
||||||
xset s noblank
|
xset s noblank
|
||||||
@@ -15,14 +25,13 @@ _backend_loop() {
|
|||||||
}
|
}
|
||||||
_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
|
for i in $(seq 1 15); do
|
||||||
curl -sf http://localhost/ > /dev/null 2>&1 && break
|
curl -sf http://localhost/ > /dev/null 2>&1 && break
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
# Chromium en boucle : redémarre automatiquement s'il plante ou se ferme
|
# Chromium en boucle : redémarre s'il plante, attend si photostation active
|
||||||
# Attend si la photostation est en cours d'exécution
|
|
||||||
while true; do
|
while true; do
|
||||||
while [ -f /tmp/photostation_running ]; do sleep 1; done
|
while [ -f /tmp/photostation_running ]; do sleep 1; done
|
||||||
chromium \
|
chromium \
|
||||||
|
|||||||
Reference in New Issue
Block a user