From 9c11fd58e25c9ecb8cedcd140ed6ee46b210c4ee Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 22 Jan 2021 03:37:29 +0100 Subject: [PATCH] service_regen_conf is deprecated in factor of regen_conf --- src/yunohost/settings.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/yunohost/settings.py b/src/yunohost/settings.py index 060aca6e4..17ab93cd4 100644 --- a/src/yunohost/settings.py +++ b/src/yunohost/settings.py @@ -8,7 +8,7 @@ from collections import OrderedDict from moulinette import m18n from yunohost.utils.error import YunohostError from moulinette.utils.log import getActionLogger -from yunohost.service import service_regen_conf +from yunohost.regenconf import regen_conf logger = getActionLogger('yunohost.settings') @@ -325,13 +325,13 @@ def trigger_post_change_hook(setting_name, old_value, new_value): @post_change_hook("security.nginx.compatibility") def reconfigure_nginx(setting_name, old_value, new_value): if old_value != new_value: - service_regen_conf(names=['nginx']) + regen_conf(names=['nginx']) @post_change_hook("security.ssh.compatibility") def reconfigure_ssh(setting_name, old_value, new_value): if old_value != new_value: - service_regen_conf(names=['ssh']) + regen_conf(names=['ssh']) @post_change_hook("smtp.allow_ipv6") @@ -342,7 +342,7 @@ def reconfigure_ssh(setting_name, old_value, new_value): @post_change_hook("security.postfix.compatibility") def reconfigure_postfix(setting_name, old_value, new_value): if old_value != new_value: - service_regen_conf(names=['postfix']) + regen_conf(names=['postfix']) @post_change_hook("pop3.enabled") @@ -364,9 +364,9 @@ def reconfigure_dovecot(setting_name, old_value, new_value): ] subprocess.call(command, env=environment) if old_value != new_value: - service_regen_conf(names=['dovecot']) + regen_conf(names=['dovecot']) else: if old_value != new_value: - service_regen_conf(names=['dovecot']) + regen_conf(names=['dovecot']) command = ['apt-get', '-y', 'remove', dovecot_package] subprocess.call(command, env=environment)