mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Add hook support in domain_dns_conf
This commit is contained in:
parent
dfd1a8b1a6
commit
439a999c02
1 changed files with 6 additions and 0 deletions
|
@ -188,6 +188,7 @@ def domain_dns_conf(domain, ttl=None):
|
||||||
ttl -- Time to live
|
ttl -- Time to live
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
from yunohost.hook import hook_callback
|
||||||
|
|
||||||
ttl = 3600 if ttl is None else ttl
|
ttl = 3600 if ttl is None else ttl
|
||||||
|
|
||||||
|
@ -209,6 +210,11 @@ def domain_dns_conf(domain, ttl=None):
|
||||||
for record in dns_conf["mail"]:
|
for record in dns_conf["mail"]:
|
||||||
result += "\n{name} {ttl} IN {type} {value}".format(**record)
|
result += "\n{name} {ttl} IN {type} {value}".format(**record)
|
||||||
|
|
||||||
|
result += "\n\n"
|
||||||
|
result += "; Custom\n"
|
||||||
|
|
||||||
|
result += ''.join(hook_callback('custom_dns_rules', args=[])['stdreturn'])
|
||||||
|
|
||||||
is_cli = True if msettings.get('interface') == 'cli' else False
|
is_cli = True if msettings.get('interface') == 'cli' else False
|
||||||
if is_cli:
|
if is_cli:
|
||||||
logger.info(m18n.n("domain_dns_conf_is_just_a_recommendation"))
|
logger.info(m18n.n("domain_dns_conf_is_just_a_recommendation"))
|
||||||
|
|
Loading…
Add table
Reference in a new issue