Kiosk : git pull auto + diagnostic caméra dans admin
- kiosk-session.sh : git pull à chaque démarrage du backend (les correctifs Gitea sont maintenant déployés automatiquement) - Log backend dans /tmp/photobooth-backend.log (lisible via admin) - Admin > Infos : bouton "Diagnostic camera" → appelle /api/camera/debug et affiche mode, connectee, erreur capture_preview, widgets gphoto2 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -657,6 +657,13 @@
|
||||
<div id="infos-systeme-contenu" class="infos-systeme-contenu">
|
||||
<p class="infos-chargement">Chargement...</p>
|
||||
</div>
|
||||
<div class="infos-systeme-header" style="margin-top:1.5rem">
|
||||
<h3>Diagnostic camera</h3>
|
||||
<button class="btn-action btn-petit" onclick="chargerDiagCamera()">↻ Tester</button>
|
||||
</div>
|
||||
<div id="diag-camera-contenu" style="font-family:monospace;font-size:0.75rem;background:#111;color:#0f0;padding:0.75rem;border-radius:6px;white-space:pre-wrap;max-height:300px;overflow-y:auto">
|
||||
Appuyer sur Tester...
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -939,3 +939,22 @@ async function regenererBoothPassword() {
|
||||
afficherStatut('Erreur connexion au serveur booth', 'erreur');
|
||||
}
|
||||
}
|
||||
|
||||
async function chargerDiagCamera() {
|
||||
const el = document.getElementById('diag-camera-contenu');
|
||||
el.textContent = 'Test en cours...';
|
||||
try {
|
||||
const data = await apiGet('/api/camera/debug');
|
||||
let txt = '';
|
||||
for (const [k, v] of Object.entries(data)) {
|
||||
if (k === 'config_widgets_top') {
|
||||
txt += `${k}: ${Array.isArray(v) ? v.join(', ') : v}\n`;
|
||||
} else {
|
||||
txt += `${k}: ${JSON.stringify(v)}\n`;
|
||||
}
|
||||
}
|
||||
el.textContent = txt || 'Aucune donnee';
|
||||
} catch (e) {
|
||||
el.textContent = 'ERREUR : ' + e.message;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -25,8 +25,10 @@ sleep 1
|
||||
_backend_loop() {
|
||||
while true; do
|
||||
cd /home/jules/photobooth
|
||||
# Mise à jour automatique depuis Gitea
|
||||
git pull --ff-only 2>&1 | logger -t photobooth-git
|
||||
source .venv/bin/activate
|
||||
authbind --deep python -m backend.main
|
||||
authbind --deep python -m backend.main 2>&1 | tee -a /tmp/photobooth-backend.log
|
||||
echo "[kiosk] backend terminé, redémarrage dans 3s..."
|
||||
sleep 3
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user