implement shutdown

This commit is contained in:
cool-mist
2026-07-11 21:10:24 +05:30
parent d1ff5c0b10
commit a5403a5de3
8 changed files with 285 additions and 119 deletions
+1 -1
View File
@@ -65,9 +65,9 @@ fn read_command(stream: &mut TcpStream) -> WResult<String> {
Ok(command)
}
// TODO: Use DBus to send a message to systemd instead of spawning a new process
fn build_shutdown_cmd() -> Command {
let mut cmd = Command::new("systemctl");
cmd.arg("-k");
cmd.arg("poweroff");
cmd