[fix] Use new service_regen_conf method name

This commit is contained in:
Jérôme Lebleu 2016-04-10 16:57:09 +02:00
parent a7657c1a39
commit c09e322d24
2 changed files with 12 additions and 12 deletions

View file

@ -78,7 +78,7 @@ def domain_add(auth, domain, dyndns=False):
dyndns -- Subscribe to DynDNS
"""
from yunohost.service import service_regenconf
from yunohost.service import service_regen_conf
from yunohost.hook import hook_callback
attr_dict = { 'objectClass' : ['mailDomain', 'top'] }
@ -157,10 +157,10 @@ def domain_add(auth, domain, dyndns=False):
try:
with open('/etc/yunohost/installed', 'r') as f:
service_regenconf(service='nginx')
service_regenconf(service='metronome')
service_regenconf(service='dnsmasq')
service_regenconf(service='rmilter')
service_regen_conf(service='nginx')
service_regen_conf(service='metronome')
service_regen_conf(service='dnsmasq')
service_regen_conf(service='rmilter')
os.system('yunohost app ssowatconf > /dev/null 2>&1')
except IOError: pass
except:
@ -183,7 +183,7 @@ def domain_remove(auth, domain, force=False):
force -- Force the domain removal
"""
from yunohost.service import service_regenconf
from yunohost.service import service_regen_conf
from yunohost.hook import hook_callback
if not force and domain not in domain_list(auth)['domains']:
@ -206,9 +206,9 @@ def domain_remove(auth, domain, force=False):
else:
raise MoulinetteError(errno.EIO, m18n.n('domain_deletion_failed'))
service_regenconf(service='nginx')
service_regenconf(service='metronome')
service_regenconf(service='dnsmasq')
service_regen_conf(service='nginx')
service_regen_conf(service='metronome')
service_regen_conf(service='dnsmasq')
os.system('yunohost app ssowatconf > /dev/null 2>&1')
hook_callback('post_domain_remove', args=[domain])

View file

@ -43,7 +43,7 @@ from yunohost.app import app_fetchlist, app_info, app_upgrade, app_ssowatconf, a
from yunohost.domain import domain_add, domain_list, get_public_ip
from yunohost.dyndns import dyndns_subscribe
from yunohost.firewall import firewall_upnp, firewall_reload
from yunohost.service import service_status, service_regenconf, service_log
from yunohost.service import service_status, service_regen_conf, service_log
from yunohost.monitor import monitor_disk, monitor_network, monitor_system
from yunohost.utils.packages import ynh_packages_version
@ -152,7 +152,7 @@ def tools_maindomain(auth, old_domain=None, new_domain=None, dyndns=False):
try:
with open('/etc/yunohost/installed', 'r') as f:
service_regenconf()
service_regen_conf()
except IOError: pass
logger.success(m18n.n('maindomain_changed'))
@ -275,7 +275,7 @@ def tools_postinstall(domain, password, ignore_dyndns=False):
os.system('update-rc.d yunohost-firewall enable')
os.system('service yunohost-firewall start')
service_regenconf(force=True)
service_regen_conf(force=True)
logger.success(m18n.n('yunohost_configured'))