diff --git a/data/actionsmap/yunohost.yml b/data/actionsmap/yunohost.yml index 8355472ce..a34d2af11 100644 --- a/data/actionsmap/yunohost.yml +++ b/data/actionsmap/yunohost.yml @@ -302,9 +302,9 @@ domain: arguments: domain: help: Target domain - -ttl: - full: --time-to-live - help: Time to live in secound before DNS servers update this information. Without this option, ttl is set to 3600s, one hour. + -t: + full: --ttl + help: Time To Live (TTL) is second before DNS servers update. Default is 3600 second (i.e. 1 hour). extra: pattern: &pattern_ttl - !!str ^[0-9]+$ diff --git a/src/yunohost/domain.py b/src/yunohost/domain.py index 3586a761c..a7f4befae 100644 --- a/src/yunohost/domain.py +++ b/src/yunohost/domain.py @@ -220,7 +220,7 @@ def domain_remove(auth, domain, force=False): msignals.display(m18n.n('domain_deleted'), 'success') -def domain_dns_conf(domain, time_to_live): +def domain_dns_conf(domain, ttl): """ Generate DNS configuration for a domain @@ -229,7 +229,7 @@ def domain_dns_conf(domain, time_to_live): time to live -- Time to live """ - ttl = 3600 if time_to_live is None else time_to_live + ttl = 3600 if ttl is None else ttl ip4 = urlopen("http://ip.yunohost.org").read().strip()