diff --git a/locales/en.json b/locales/en.json index 7ce7d2980..6b80e863e 100644 --- a/locales/en.json +++ b/locales/en.json @@ -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", diff --git a/src/yunohost/domain.py b/src/yunohost/domain.py index 4665f9905..7e1a99787 100644 --- a/src/yunohost/domain.py +++ b/src/yunohost/domain.py @@ -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