mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
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 <veiko17@disroot.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
37a38549bf
commit
8d57aca6d1
@ -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."""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user