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

Function service_is_running

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

Source from the content-addressed store, hash-verified

124}
125
126pub fn service_is_running() -> Result<bool, Error> {
127 let mut is_active = Command::new("systemctl");
128 is_active.args(["is-active", "--quiet", SERVICE_UNIT_NAME]);
129 let output = command_output(&mut is_active, "systemctl is-active clawshell.service")?;
130 Ok(output.status.success())
131}
132
133pub fn service_config_path() -> Result<Option<PathBuf>, Error> {
134 let service_path = PathBuf::from(autostart_service_path());

Callers 3

cmd_stopFunction · 0.50
cmd_statusFunction · 0.50
cmd_onboardFunction · 0.50

Calls 1

command_outputFunction · 0.85

Tested by

no test coverage detected