()
| 124 | } |
| 125 | |
| 126 | pub 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 | |
| 133 | pub fn service_config_path() -> Result<Option<PathBuf>, Error> { |
| 134 | let service_path = PathBuf::from(autostart_service_path()); |
no test coverage detected