Commit 613cb9ec authored by segfault's avatar segfault

Always use container.stop() to stop the service

Remove the now unused systemd.stop() function
parent 931c30f1
......@@ -225,8 +225,10 @@ class OnionService(DBusObject, metaclass=abc.ABCMeta):
if DEBUG:
logger.exception(e)
input("Paused to allow debugging. Press Enter to continue")
# Stop the service manually, because calling Stop() would set confusing status messages
if self.IsRunning:
self.systemd.stop()
self.container.stop()
if self.IsPublished:
self.tor.stop_hidden_service(self.Address)
self.Status = Status.ERROR
......
......@@ -51,10 +51,6 @@ class SystemdManager(object):
raise SystemdError("Failed to start %s (timeout: %s)", self.id, START_TIMEOUT)
def stop(self):
logger.debug("Stopping %s", self.id)
sh.systemctl("-M", self.container, "stop", self.service)
def is_running(self) -> bool:
try:
sh.machinectl("show", self.container)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment