diff --git a/routlin/status.py b/routlin/status.py index 6a70b1a..3dffb50 100644 --- a/routlin/status.py +++ b/routlin/status.py @@ -119,7 +119,8 @@ def _sysctl_query(unit): """Return (active, enabled) strings from systemctl.""" r_a = subprocess.run(["systemctl", "is-active", unit], capture_output=True, text=True) r_e = subprocess.run(["systemctl", "is-enabled", unit], capture_output=True, text=True) - return r_a.stdout.strip(), r_e.stdout.strip() + enabled = r_e.stdout.strip() or "not-found" + return r_a.stdout.strip(), enabled # =================================================================== # Result builders