Remote: reboot / shutdown the Pi from the Output tab
Add POST /api/power/:action (reboot|shutdown) that runs `sudo systemctl reboot|poweroff` (sudo is passwordless on the appliance), replying before the host tears down. Two red buttons in the Output tab use a two-tap confirm to avoid accidental power-offs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
6657d1afab
commit
7b01c23c2e
4 files changed
+35
No files matched your search
@@ -126,6 +126,10 @@
|
||||
</select>
|
||||
<button id="rec" class="wide">🔴 Avvia registrazione</button>
|
||||
<div id="rec-status" class="hint"></div>
|
||||
<label class="lbl">Dispositivo</label>
|
||||
<button id="pw-reboot" class="wide danger">🔄 Riavvia Raspberry</button>
|
||||
<button id="pw-shutdown" class="wide danger">⏻ Spegni Raspberry</button>
|
||||
<div id="pw-status" class="hint">Tocca due volte per confermare. Dopo lo spegnimento, per riaccendere stacca e riattacca l'alimentazione.</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
|
||||
Reference in new issue
Block a user