Merge pull request #346 from YunoHost/fix-559-dns-conf-is-not-actual-conf

[fix] Tell user that domain dns-conf shows a recommendation only
This commit is contained in:
Laurent Peuch 2017-08-18 03:24:48 +02:00 committed by GitHub
commit 8567164d58
2 changed files with 6 additions and 1 deletions

View file

@ -142,6 +142,7 @@
"domain_creation_failed": "Unable to create domain",
"domain_deleted": "The domain has been deleted",
"domain_deletion_failed": "Unable to delete domain",
"domain_dns_conf_is_just_a_recommendation": "This command shows you what is the *recommended* configuration. It does not actually set up the DNS configuration for you. It is your responsability to configure your DNS zone in your registrar according to this recommendation.",
"domain_dyndns_already_subscribed": "You've already subscribed to a DynDNS domain",
"domain_dyndns_invalid": "Invalid domain to use with DynDNS",
"domain_dyndns_root_unknown": "Unknown DynDNS root domain",

View file

@ -32,7 +32,7 @@ import requests
from urllib import urlopen
from moulinette import m18n
from moulinette import m18n, msettings
from moulinette.core import MoulinetteError
from moulinette.utils.log import getActionLogger
@ -216,6 +216,10 @@ def domain_dns_conf(domain, ttl=None):
for record in dns_conf["mail"]:
result += "\n{name} {ttl} IN {type} {value}".format(**record)
is_cli = True if msettings.get('interface') == 'cli' else False
if is_cli:
logger.warning(m18n.n("domain_dns_conf_is_just_a_recommendation"))
return result