fix apply config event
This commit is contained in:
@@ -200,6 +200,17 @@ def get_process_stats():
|
||||
"uptime": None
|
||||
}
|
||||
|
||||
def get_os_type() -> str:
|
||||
"""
|
||||
Detects the host OS type to determine which service manager to use.
|
||||
Currently supports: 'alpine', 'debian' (fallback for systemd systems).
|
||||
"""
|
||||
if os.path.exists("/etc/alpine-release"):
|
||||
return "alpine"
|
||||
|
||||
# Fallback to debian/ubuntu (systemd)
|
||||
return "debian"
|
||||
|
||||
def format_seconds(seconds: float) -> str:
|
||||
seconds = int(seconds)
|
||||
days, seconds = divmod(seconds, 86400)
|
||||
|
||||
Reference in New Issue
Block a user