MCPcopy Create free account
hub / github.com/clawshell/clawshell / service_restart

Function service_restart

src/platform/linux.rs:119–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

117}
118
119pub fn service_restart() -> Result<(), Error> {
120 let mut restart = Command::new("systemctl");
121 restart.args(["restart", SERVICE_UNIT_NAME]);
122 command_status(&mut restart, "systemctl restart clawshell.service")?;
123 Ok(())
124}
125
126pub fn service_is_running() -> Result<bool, Error> {
127 let mut is_active = Command::new("systemctl");

Callers 1

cmd_restartFunction · 0.50

Calls 1

command_statusFunction · 0.85

Tested by

no test coverage detected