From cb8d5ecb3558f73d244575da07304229ed46782b Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Sun, 11 Jul 2021 15:25:42 -0400 Subject: [PATCH] app_deploy: add "is_system_service" configuration option This allows users to add update manager "clients" that don't have systemd services registered. Signed-off-by: Eric Callahan --- moonraker/components/update_manager/app_deploy.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/moonraker/components/update_manager/app_deploy.py b/moonraker/components/update_manager/app_deploy.py index 12a91cc..c1ed044 100644 --- a/moonraker/components/update_manager/app_deploy.py +++ b/moonraker/components/update_manager/app_deploy.py @@ -68,6 +68,7 @@ class AppDeploy(BaseDeploy): self._verify_path(config, 'env', self.executable) self.venv_args = config.get('venv_args', None) + self.is_service = config.getboolean("is_system_service", True) self.need_channel_update = False self._is_valid = False @@ -138,6 +139,10 @@ class AppDeploy(BaseDeploy): raise NotImplementedError async def restart_service(self): + if not self.is_service: + self.notify_status( + "Application not configured as service, skipping restart") + return if self.name == "moonraker": # Launch restart async so the request can return # before the server restarts