From 8d57aca6d11d33081a926a7728750279e1e99fdf Mon Sep 17 00:00:00 2001 From: Veiko Aasa Date: Sun, 24 Jan 2021 10:59:15 +0200 Subject: [PATCH] plinth: Fix disable daemon when service alias is provided Fixes the issue that after disabling an app which has a daemon alias, only the alias was disabled and the real service kept still running. Closes #2019 Test on Debian testing: After disabling the bind app, check that both 'bind9' and 'named' services are not running. Signed-off-by: Veiko Aasa Reviewed-by: Sunil Mohan Adapa --- plinth/daemon.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plinth/daemon.py b/plinth/daemon.py index 3d04f5ca7..532922e32 100644 --- a/plinth/daemon.py +++ b/plinth/daemon.py @@ -76,6 +76,8 @@ class Daemon(app.LeaderComponent): def disable(self): """Run operations to disable the daemon/unit.""" actions.superuser_run('service', ['disable', self.unit]) + if self.alias: + actions.superuser_run('service', ['disable', self.alias]) def is_running(self): """Return whether the daemon/unit is running."""