From b64f9c7fe788a5670ce490d306445a3266985c15 Mon Sep 17 00:00:00 2001 From: epgdatacapbon Date: Mon, 11 Jan 2016 16:01:05 +0900 Subject: [PATCH] Added MyDNS.JP Add support for MyDNS.JP http://www.mydns.jp/ --- README.md | 3 +- ddclient | 87 ++++++++++++++++++++++++++++++++++++++++ sample-etc_ddclient.conf | 8 ++++ 3 files changed, 97 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4560eeb..0cfb76a 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,9 @@ Dynamic DNS services currently supported include: nsupdate - See nsupdate(1) and ddns-confgen(8) for details CloudFlare - See https://www.cloudflare.com/ for details Google - See http://www.google.com/domains for details - Duckdns - See https://duckdns.org/ for details + Duckdns - See https://duckdns.org/ for details woima.fi - See https://woima.fi/ for details + MyDNS.JP - See http://www.mydns.jp/ for details DDclient now supports many of cable/dsl broadband routers. diff --git a/ddclient b/ddclient index a2805e8..a2ab20b 100755 --- a/ddclient +++ b/ddclient @@ -477,6 +477,10 @@ my %variables = ( 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), 'warned-min-error-interval' => setv(T_ANY, 0, 1, 0, 0, undef), }, + 'mydns-common-defaults' => { + 'server' => setv(T_FQDNP, 1, 0, 1, 'www.mydns.jp', undef), + 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('6d'), 0), + }, ); my %services = ( 'dyndns1' => { @@ -670,6 +674,15 @@ my %services = ( $variables{'woima-service-common-defaults'}, ), }, + 'mydns' => { + 'updateable' => undef, + 'update' => \&nic_mydns_update, + 'examples' => \&nic_mydns_examples, + 'variables' => merge( + $variables{'mydns-common-defaults'}, + $variables{'service-common-defaults'}, + ), + }, ); $variables{'merged'} = merge($variables{'global-defaults'}, $variables{'service-common-defaults'}, @@ -4480,6 +4493,80 @@ sub nic_woima_update { } } +###################################################################### +## nic_mydns_examples +###################################################################### +sub nic_mydns_examples { + return </i; + $config{$h}{'status'} = 'failed'; + warning("SENT: %s", $url) unless opt('verbose'); + warning("REPLIED: %s", $1); + failed("updating %s: Invalid reply.", $h); + } + } +} ###################################################################### # vim: ai ts=4 sw=4 tw=78 : diff --git a/sample-etc_ddclient.conf b/sample-etc_ddclient.conf index 79a7130..64ebfe3 100644 --- a/sample-etc_ddclient.conf +++ b/sample-etc_ddclient.conf @@ -221,3 +221,11 @@ ssl=yes # use ssl-support. Works with # password=my-auto-generated-password # protocol=duckdns hostwithoutduckdnsorg +## +## MyDNS (www.mydns.jp) +## +# protocol=mydns +# server=www.mydns.jp +# login=my-mydns.jp-login +# password=my-mydns.jp-password +# your-host.mydns.jp