mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-30 20:56:39 +00:00
feature(services): hook up the root daemon client
This commit is contained in:
parent
bb6d59e29f
commit
ad1076ad4f
|
@ -241,23 +241,23 @@ class Service(ABC):
|
|||
def stop(cls):
|
||||
"""Stop the service. Usually this means stopping systemd unit."""
|
||||
for unit in cls.get_units():
|
||||
run(["systemctl", "stop", unit], check=False)
|
||||
# run(["systemctl", "stop", unit], check=False)
|
||||
# TODO: use root separation daemon:
|
||||
# call_root_function(["systemctl", "stop", unit])
|
||||
call_root_function(["systemctl", "stop", unit])
|
||||
|
||||
@staticmethod
|
||||
def start(cls):
|
||||
"""Start the service. Usually this means starting systemd unit."""
|
||||
for unit in cls.get_units():
|
||||
run(["systemctl", "start", unit], check=False)
|
||||
# call_root_function(["systemctl", "start", unit])
|
||||
# run(["systemctl", "start", unit], check=False)
|
||||
call_root_function(["systemctl", "start", unit])
|
||||
|
||||
@staticmethod
|
||||
def restart(cls):
|
||||
"""Restart the service. Usually this means restarting systemd unit."""
|
||||
for unit in cls.get_units():
|
||||
run(["systemctl", "restart", unit], check=False)
|
||||
# call_root_function(["systemctl", "restart", unit])
|
||||
# run(["systemctl", "restart", unit], check=False)
|
||||
call_root_function(["systemctl", "restart", unit])
|
||||
|
||||
@classmethod
|
||||
def get_configuration(cls):
|
||||
|
|
Loading…
Reference in a new issue