From 5ef0c84c0f438ebfe5d73b560a95034a4f48c665 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Sun, 30 Jun 2024 18:34:38 +0200 Subject: [PATCH] Update tools.py: use _run_service_command to enable+start yunohost-firewall during postinstall and prevent a warning about lack of diagnosis ignore rule --- src/tools.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools.py b/src/tools.py index 7c6b39d5c..726841e48 100644 --- a/src/tools.py +++ b/src/tools.py @@ -41,7 +41,6 @@ from yunohost.app_catalog import ( ) from yunohost.domain import domain_add from yunohost.firewall import firewall_upnp -from yunohost.service import service_start, service_enable from yunohost.regenconf import regen_conf from yunohost.utils.system import ( _dump_sources_list, @@ -156,6 +155,7 @@ def tools_postinstall( force_diskspace=False, overwrite_root_password=True, ): + from yunohost.service import _run_service_command from yunohost.dyndns import _dyndns_available, dyndns_unsubscribe from yunohost.utils.dns import is_yunohost_dyndns_domain from yunohost.utils.password import ( @@ -270,8 +270,8 @@ def tools_postinstall( os.system("touch /etc/yunohost/installed") # Enable and start YunoHost firewall at boot time - service_enable("yunohost-firewall") - service_start("yunohost-firewall") + _run_service_command("enable", "yunohost-firewall") + _run_service_command("start", "yunohost-firewall") regen_conf(names=["ssh"], force=True)