mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Use app_ssowatconf instead of os.system call
This commit is contained in:
parent
968259239d
commit
360ac66bc7
1 changed files with 3 additions and 1 deletions
|
@ -73,6 +73,7 @@ def domain_add(auth, domain, dyndns=False):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from yunohost.hook import hook_callback
|
from yunohost.hook import hook_callback
|
||||||
|
from yunohost.app import app_ssowatconf
|
||||||
|
|
||||||
try:
|
try:
|
||||||
auth.validate_uniqueness({'virtualdomain': domain})
|
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):
|
if not auth.add('virtualdomain=%s,ou=domains' % domain, attr_dict):
|
||||||
raise MoulinetteError(errno.EIO, m18n.n('domain_creation_failed'))
|
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'):
|
if os.path.exists('/etc/yunohost/installed'):
|
||||||
service_regen_conf(names=['nginx', 'metronome', 'dnsmasq', 'rmilter'])
|
service_regen_conf(names=['nginx', 'metronome', 'dnsmasq', 'rmilter'])
|
||||||
os.system('yunohost app ssowatconf > /dev/null 2>&1')
|
app_ssowatconf(auth)
|
||||||
|
|
||||||
except:
|
except:
|
||||||
# Force domain removal silently
|
# Force domain removal silently
|
||||||
|
|
Loading…
Add table
Reference in a new issue