feat: add restart_with_sudo command

closes #363
This commit is contained in:
CJ van den Berg 2025-11-24 11:39:57 +01:00
parent 51f74e37b8
commit 93be688e6c
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -917,6 +917,12 @@ const cmds = struct {
}
pub const restart_meta: Meta = .{ .description = "Restart (without saving)" };
pub fn restart_with_sudo(_: *Self, _: Ctx) Result {
root.set_restart_with_sudo();
try tp.self_pid().send("restart");
}
pub const restart_with_sudo_meta: Meta = .{ .description = "Restart with sudo" };
pub fn force_terminate(self: *Self, _: Ctx) Result {
self.deinit();
root.print_exit_status({}, "FORCE TERMINATE");