diff --git a/moonraker/components/update_manager/app_deploy.py b/moonraker/components/update_manager/app_deploy.py index 36acde5..65ffa9f 100644 --- a/moonraker/components/update_manager/app_deploy.py +++ b/moonraker/components/update_manager/app_deploy.py @@ -23,6 +23,7 @@ from typing import ( if TYPE_CHECKING: from confighelper import ConfigHelper from .update_manager import CommandHelper + from ..machine import Machine CHANNEL_TO_TYPE = { "stable": "zip", @@ -173,9 +174,9 @@ class AppDeploy(BaseDeploy): async def _do_restart(self) -> None: self.notify_status("Restarting Service...") + machine: Machine = self.server.lookup_component("machine") try: - await self.cmd_helper.run_cmd( - f"sudo systemctl restart {self.name}") + await machine.do_service_action("restart", self.name) except Exception: if self.name == "moonraker": # We will always get an error when restarting moonraker