Development
This commit is contained in:
parent
100f783462
commit
44ae8f0fe8
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue