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:
@@ -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"}'
|
||||
|
||||
Reference in New Issue
Block a user