Kiosk : flag maintenance + anti-doublon backend
- Check /tmp/photobooth-maintenance pour bloquer le restart loop - Vérifie qu'aucun backend ne tourne avant d'en lancer un nouveau Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,14 @@ sleep 1
|
|||||||
# Backend en boucle : redémarre automatiquement s'il plante
|
# Backend en boucle : redémarre automatiquement s'il plante
|
||||||
_backend_loop() {
|
_backend_loop() {
|
||||||
while true; do
|
while true; do
|
||||||
|
# Mode maintenance : attendre la fin de l'intervention
|
||||||
|
while [ -f /tmp/photobooth-maintenance ]; do sleep 2; done
|
||||||
|
# Vérifier qu'aucun autre backend ne tourne (éviter les doublons)
|
||||||
|
if pgrep -f "python.*backend.main" > /dev/null 2>&1; then
|
||||||
|
echo "[kiosk] backend déjà en cours, attente..."
|
||||||
|
sleep 5
|
||||||
|
continue
|
||||||
|
fi
|
||||||
cd /home/jules/photobooth
|
cd /home/jules/photobooth
|
||||||
# Mise à jour automatique depuis Gitea
|
# Mise à jour automatique depuis Gitea
|
||||||
git pull --ff-only 2>&1 | logger -t photobooth-git
|
git pull --ff-only 2>&1 | logger -t photobooth-git
|
||||||
|
|||||||
Reference in New Issue
Block a user