mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge remote-tracking branch 'origin/unstable' into unstable
This commit is contained in:
commit
0a6398b8da
1 changed files with 6 additions and 0 deletions
|
@ -80,6 +80,7 @@ def domain_add(auth, domain, dyndns=False):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from yunohost.service import service_regenconf
|
from yunohost.service import service_regenconf
|
||||||
|
from yunohost.hook import hook_callback
|
||||||
|
|
||||||
attr_dict = { 'objectClass' : ['mailDomain', 'top'] }
|
attr_dict = { 'objectClass' : ['mailDomain', 'top'] }
|
||||||
try:
|
try:
|
||||||
|
@ -172,6 +173,8 @@ def domain_add(auth, domain, dyndns=False):
|
||||||
except: pass
|
except: pass
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
hook_callback('post_domain_add', args=[domain])
|
||||||
|
|
||||||
msignals.display(m18n.n('domain_created'), 'success')
|
msignals.display(m18n.n('domain_created'), 'success')
|
||||||
|
|
||||||
|
|
||||||
|
@ -185,6 +188,7 @@ def domain_remove(auth, domain, force=False):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from yunohost.service import service_regenconf
|
from yunohost.service import service_regenconf
|
||||||
|
from yunohost.hook import hook_callback
|
||||||
|
|
||||||
if not force and domain not in domain_list(auth)['domains']:
|
if not force and domain not in domain_list(auth)['domains']:
|
||||||
raise MoulinetteError(errno.EINVAL, m18n.n('domain_unknown'))
|
raise MoulinetteError(errno.EINVAL, m18n.n('domain_unknown'))
|
||||||
|
@ -211,4 +215,6 @@ def domain_remove(auth, domain, force=False):
|
||||||
service_regenconf(service='dnsmasq')
|
service_regenconf(service='dnsmasq')
|
||||||
os.system('yunohost app ssowatconf > /dev/null 2>&1')
|
os.system('yunohost app ssowatconf > /dev/null 2>&1')
|
||||||
|
|
||||||
|
hook_callback('post_domain_remove', args=[domain])
|
||||||
|
|
||||||
msignals.display(m18n.n('domain_deleted'), 'success')
|
msignals.display(m18n.n('domain_deleted'), 'success')
|
||||||
|
|
Loading…
Add table
Reference in a new issue