mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[mod] call directly python code instead of using os.system
This commit is contained in:
parent
1fe568a60d
commit
968259239d
1 changed files with 2 additions and 1 deletions
|
@ -141,6 +141,7 @@ def domain_remove(auth, domain, force=False):
|
|||
|
||||
"""
|
||||
from yunohost.hook import hook_callback
|
||||
from yunohost.app import app_ssowatconf
|
||||
|
||||
if not force and domain not in domain_list(auth)['domains']:
|
||||
raise MoulinetteError(errno.EINVAL, m18n.n('domain_unknown'))
|
||||
|
@ -167,7 +168,7 @@ def domain_remove(auth, domain, force=False):
|
|||
raise MoulinetteError(errno.EIO, m18n.n('domain_deletion_failed'))
|
||||
|
||||
service_regen_conf(names=['nginx', 'metronome', 'dnsmasq'])
|
||||
os.system('yunohost app ssowatconf > /dev/null 2>&1')
|
||||
app_ssowatconf(auth)
|
||||
|
||||
hook_callback('post_domain_remove', args=[domain])
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue