mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Regen conf for specific service
This commit is contained in:
parent
1ca528f6ce
commit
3804873142
2 changed files with 7 additions and 6 deletions
|
@ -189,14 +189,15 @@ def hook_callback(action, hooks=[], args=None):
|
|||
# Add similar hooks to the list
|
||||
# For example: Having a 16-postfix hook in the list will execute a
|
||||
# xx-postfix_dkim as well
|
||||
all_hooks = []
|
||||
for n in hooks:
|
||||
for key in hooks.keys():
|
||||
if key.startswith("%s_" % n) \
|
||||
and n not in hooks:
|
||||
hooks.append(n)
|
||||
for key in hooks_names.keys():
|
||||
if key == n or key.startswith("%s_" % n) \
|
||||
and key not in all_hooks:
|
||||
all_hooks.append(key)
|
||||
|
||||
# Iterate over given hooks names list
|
||||
for n in hooks:
|
||||
for n in all_hooks:
|
||||
try:
|
||||
hl = hooks_names[n]
|
||||
except KeyError:
|
||||
|
|
|
@ -292,7 +292,7 @@ def service_regenconf(service=None, force=False):
|
|||
if service not in _get_services().keys():
|
||||
raise MoulinetteError(errno.EINVAL, m18n.n('service_unknown', service))
|
||||
|
||||
hook_callback('conf_regen', [service] , args=[arg_force])
|
||||
hook_callback('conf_regen', [service] , args=[force])
|
||||
|
||||
msignals.display(m18n.n('service_configured', service), 'success')
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue