diff --git a/ddclient b/ddclient index a39fcf0..e1e86e5 100755 --- a/ddclient +++ b/ddclient @@ -443,6 +443,7 @@ my %variables = ( 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), + 'ttl' => setv(T_NUMBER, 1, 0, 1, 1, undef), }, 'googledomains-common-defaults' => { 'server' => setv(T_FQDNP, 1, 0, 1, 'domains.google.com', undef), @@ -4139,7 +4140,8 @@ sub nic_cloudflare_update { } # Set domain - $url = "https://$config{$key}{'server'}/api_json.html?a=rec_edit&type=A&ttl=1"; + $url = "https://$config{$key}{'server'}/api_json.html?a=rec_edit&type=A"; + $url .= "&ttl=".$config{$key}{'ttl'}; $url .= "&name=$hostname"; $url .= "&z=".$config{$key}{'zone'}; $url .= "&id=".$id; diff --git a/sample-etc_ddclient.conf b/sample-etc_ddclient.conf index 21e8957..ea6d129 100644 --- a/sample-etc_ddclient.conf +++ b/sample-etc_ddclient.conf @@ -202,7 +202,8 @@ ssl=yes # use ssl-support. Works with #zone=domain.tld, \ #server=www.cloudflare.com, \ #login=your-login-email, \ -#password=APIKey \ +#password=APIKey, \ +#ttl=1 \ #domain.tld,my.domain.tld ##