From ad1076ad4f6bdb0184fbdfae86d21800f3be541e Mon Sep 17 00:00:00 2001
From: Houkime <>
Date: Fri, 27 Dec 2024 18:27:20 +0000
Subject: [PATCH] feature(services): hook up the root daemon client

---
 selfprivacy_api/services/service.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/selfprivacy_api/services/service.py b/selfprivacy_api/services/service.py
index 15ddcdb..d841f26 100644
--- a/selfprivacy_api/services/service.py
+++ b/selfprivacy_api/services/service.py
@@ -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):