From 360ac66bc75f035217d61490967f6275698e6979 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 19 Aug 2017 11:11:49 -0400 Subject: [PATCH] Use app_ssowatconf instead of os.system call --- src/yunohost/domain.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/yunohost/domain.py b/src/yunohost/domain.py index 45715716..d28e32d3 100644 --- a/src/yunohost/domain.py +++ b/src/yunohost/domain.py @@ -73,6 +73,7 @@ def domain_add(auth, domain, dyndns=False): """ from yunohost.hook import hook_callback + from yunohost.app import app_ssowatconf try: auth.validate_uniqueness({'virtualdomain': domain}) @@ -114,9 +115,10 @@ def domain_add(auth, domain, dyndns=False): if not auth.add('virtualdomain=%s,ou=domains' % domain, attr_dict): raise MoulinetteError(errno.EIO, m18n.n('domain_creation_failed')) + # Don't regen these conf if we're still in postinstall if os.path.exists('/etc/yunohost/installed'): service_regen_conf(names=['nginx', 'metronome', 'dnsmasq', 'rmilter']) - os.system('yunohost app ssowatconf > /dev/null 2>&1') + app_ssowatconf(auth) except: # Force domain removal silently