implement shutdown
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user