feat: reboot button in Settings with password confirmation

- system.reboot RPC endpoint requires password re-verification
- Uses systemd path unit pattern (tor-helper.sh) for privilege escalation
- 2-second delay before reboot to allow RPC response to reach client
- Clean UI: password input modal, loading state, error feedback

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-20 10:48:06 +00:00
parent c82158c7c8
commit b4d204d1d6
4 changed files with 104 additions and 0 deletions

View File

@@ -109,6 +109,13 @@ case "$ACTION_TYPE" in
write_result '{"ok":true}'
;;
reboot)
write_result '{"ok":true}'
log "System reboot initiated"
sleep 1
systemctl reboot
;;
*)
log "Unknown action: $ACTION_TYPE"
write_result '{"ok":false,"error":"Unknown action"}'