remove app

This commit is contained in:
2026-06-08 10:54:52 +07:00
parent f9bec78c82
commit 47407cdbca
9 changed files with 112 additions and 13 deletions

View File

@@ -22,6 +22,9 @@ class ServiceManager:
def restart_service(self, service_name: str) -> None:
self.command_runner.run(["systemctl", "restart", service_name])
def reset_failed(self, service_name: str) -> None:
self.command_runner.run(["systemctl", "reset-failed", service_name])
def get_service_status(self, service_name: str) -> dict[str, object]:
active = self._query(["systemctl", "is-active", service_name]) == "active"
enabled = self._query(["systemctl", "is-enabled", service_name]) == "enabled"
@@ -37,4 +40,3 @@ class ServiceManager:
return self.command_runner.run(command).stdout.strip()
except Exception:
return "unknown"