From 96b052432adfbcf35d4d2bc503ce7f17abcaecc4 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 28 Aug 2024 20:52:16 -0700 Subject: [PATCH] bind: Don't start a stopped daemon during changes/upgrades Tests: - Without patch, disable bind. Incrementing the app's version number results in bind getting started. - With patch, disable bind. Incrementing the app's version number does not result in bind getting started. - Without patch, disable bind. Update forwarders. Bind is running again. - With patch, disable bind. Update forwarders. Bind is not running again. Signed-off-by: Sunil Mohan Adapa Reviewed-by: Veiko Aasa --- plinth/modules/bind/privileged.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plinth/modules/bind/privileged.py b/plinth/modules/bind/privileged.py index 0e1713229..8e339680d 100644 --- a/plinth/modules/bind/privileged.py +++ b/plinth/modules/bind/privileged.py @@ -45,14 +45,14 @@ def setup(old_version: int): Path(ZONES_DIR).mkdir(exist_ok=True, parents=True) - action_utils.service_restart('named') + action_utils.service_try_restart('named') @privileged def configure(forwarders: str): """Configure BIND.""" _set_forwarders(forwarders) - action_utils.service_restart('named') + action_utils.service_try_restart('named') def get_config():