mirror of
https://github.com/kiviktnm/decman.git
synced 2026-09-19 12:08:28 +00:00
Dont start enabled systemd units immediately
This commit is contained in:
@@ -89,7 +89,7 @@ class Commands:
|
|||||||
"""
|
"""
|
||||||
Running this command enables the given systemd units.
|
Running this command enables the given systemd units.
|
||||||
"""
|
"""
|
||||||
return ["systemctl", "enable", "--now", "--quiet"] + units
|
return ["systemctl", "enable", "--quiet"] + units
|
||||||
|
|
||||||
def disable_units(self, units: list[str]) -> list[str]:
|
def disable_units(self, units: list[str]) -> list[str]:
|
||||||
"""
|
"""
|
||||||
@@ -99,16 +99,14 @@ class Commands:
|
|||||||
|
|
||||||
def enable_user_units(self, units: list[str], user: str) -> list[str]:
|
def enable_user_units(self, units: list[str], user: str) -> list[str]:
|
||||||
"""
|
"""
|
||||||
Running this command enables the given systemd units for the user it's run as.
|
Running this command enables the given systemd units for the user.
|
||||||
"""
|
"""
|
||||||
return [
|
return ["systemctl", "--quiet", "--user", "-M", f"{user}@", "enable"
|
||||||
"systemctl", "--quiet", "--user", "-M", f"{user}@", "enable",
|
] + units
|
||||||
"--now"
|
|
||||||
] + units
|
|
||||||
|
|
||||||
def disable_user_units(self, units: list[str], user: str) -> list[str]:
|
def disable_user_units(self, units: list[str], user: str) -> list[str]:
|
||||||
"""
|
"""
|
||||||
Running this command disables the given systemd units fol the user it's run as.
|
Running this command disables the given systemd units for the user.
|
||||||
"""
|
"""
|
||||||
return ["systemctl", "--quiet", "--user", "-M", f"{user}@", "disable"
|
return ["systemctl", "--quiet", "--user", "-M", f"{user}@", "disable"
|
||||||
] + units
|
] + units
|
||||||
|
|||||||
Reference in New Issue
Block a user