|
From: <abe...@us...> - 2017-01-29 00:14:36
|
Revision: 8131
http://sourceforge.net/p/astlinux/code/8131
Author: abelbeck
Date: 2017-01-29 00:14:33 +0000 (Sun, 29 Jan 2017)
Log Message:
-----------
ddclient, switch to ddclient-curl version 3.8.3-01. Add DDGETIPV6 rc.conf variable
Modified Paths:
--------------
branches/1.0/package/ddclient/Config.in
branches/1.0/package/ddclient/ddclient.conf
branches/1.0/package/ddclient/ddclient.mk
branches/1.0/package/ddclient/dynamicdns.init
branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf
Removed Paths:
-------------
branches/1.0/package/ddclient/ddclient-01-bang-perl-cleanup.patch
branches/1.0/package/ddclient/ddclient-05-zoneedit-error-result-fix.patch
branches/1.0/package/ddclient/ddclient-10-curl-ssl.patch
branches/1.0/package/ddclient/ddclient-21-cloudflare-ttl.patch
branches/1.0/package/ddclient/ddclient-22-cloudflare-api-v4.patch
branches/1.0/package/ddclient/ddclient-23-cloudflare-curl-headers.patch
branches/1.0/package/ddclient/ddclient-24-cloudflare-JSON-PP.patch
Modified: branches/1.0/package/ddclient/Config.in
===================================================================
--- branches/1.0/package/ddclient/Config.in 2017-01-28 20:26:14 UTC (rev 8130)
+++ branches/1.0/package/ddclient/Config.in 2017-01-29 00:14:33 UTC (rev 8131)
@@ -8,5 +8,5 @@
DDclient is a Perl client used to update dynamic DNS entries for
accounts on a Dynamic DNS Network Service Provider.
- http://sourceforge.net/projects/ddclient/
+ https://github.com/astlinux-project/ddclient-curl
Deleted: branches/1.0/package/ddclient/ddclient-01-bang-perl-cleanup.patch
===================================================================
--- branches/1.0/package/ddclient/ddclient-01-bang-perl-cleanup.patch 2017-01-28 20:26:14 UTC (rev 8130)
+++ branches/1.0/package/ddclient/ddclient-01-bang-perl-cleanup.patch 2017-01-29 00:14:33 UTC (rev 8131)
@@ -1,6 +0,0 @@
---- ddclient-3.8.3/ddclient.orig 2014-05-09 18:07:36.000000000 -0500
-+++ ddclient-3.8.3/ddclient 2014-05-09 18:04:23.000000000 -0500
-@@ -1,3 +1,2 @@
- #!/usr/bin/perl -w
--#!/usr/local/bin/perl -w
- ######################################################################
Deleted: branches/1.0/package/ddclient/ddclient-05-zoneedit-error-result-fix.patch
===================================================================
--- branches/1.0/package/ddclient/ddclient-05-zoneedit-error-result-fix.patch 2017-01-28 20:26:14 UTC (rev 8130)
+++ branches/1.0/package/ddclient/ddclient-05-zoneedit-error-result-fix.patch 2017-01-29 00:14:33 UTC (rev 8131)
@@ -1,11 +0,0 @@
---- ddclient-3.8.3/ddclient.orig 2014-05-09 18:07:36.000000000 -0500
-+++ ddclient-3.8.3/ddclient 2014-05-09 18:04:23.000000000 -0500
-@@ -3072,7 +3072,7 @@
- $status_text = $var{'TEXT'} if exists $var{'TEXT'};
- $status_ip = $var{'IP'} if exists $var{'IP'};
-
-- if ($status eq 'SUCCESS' || ($status eq 'ERROR' && $var{'CODE'} eq '707')) {
-+ if ($status eq 'SUCCESS' || ($status eq 'ERROR' && ($var{'CODE'} eq '707' || $var{'CODE'} eq '702'))) {
- $config{$h}{'ip'} = $status_ip;
- $config{$h}{'mtime'} = $now;
- $config{$h}{'status'} = 'good';
Deleted: branches/1.0/package/ddclient/ddclient-10-curl-ssl.patch
===================================================================
--- branches/1.0/package/ddclient/ddclient-10-curl-ssl.patch 2017-01-28 20:26:14 UTC (rev 8130)
+++ branches/1.0/package/ddclient/ddclient-10-curl-ssl.patch 2017-01-29 00:14:33 UTC (rev 8131)
@@ -1,94 +0,0 @@
---- ddclient-3.8.3/ddclient.orig 2015-06-27 16:55:28.055154000 -0400
-+++ ddclient-3.8.3/ddclient 2016-02-17 19:35:16.741410191 -0500
-@@ -1916,7 +1916,7 @@
- if ( $force_ssl || ($globals{'ssl'} and (caller(1))[3] ne 'main::get_ip') ) {
- $use_ssl = 1;
- $default_port = 443;
-- load_ssl_support;
-+# load_ssl_support;
- } else {
- $use_ssl = 0;
- $default_port = 80;
-@@ -1953,58 +1953,32 @@
- debug("skipped network connection");
- verbose("SENDING:", "%s", $request);
- } elsif ($use_ssl) {
-- $sd = IO::Socket::SSL->new(
-- PeerAddr => $peer,
-- PeerPort => $port,
-- Proto => 'tcp',
-- MultiHomed => 1,
-- Timeout => opt('timeout'),
-- );
-- defined $sd or warning("cannot connect to $peer:$port socket: $@ " . IO::Socket::SSL::errstr());
-+ $0 = sprintf("%s - curl (SSL) sending to %s port %s", $program, $peer, $port);
-+ my $timeout = opt('timeout');
-+
-+ $reply = <<`CURL_SSL`;
-+/usr/bin/curl -ksi0 --user '${login}:${password}' --user-agent '${program}/${version}' \\
-+ --connect-timeout $timeout --max-time $timeout \\
-+ --url 'https://${server}/${url}' 2>/dev/null
-+CURL_SSL
-+
-+ if (! $reply) {
-+ warning("curl (SSL) cannot connect to $peer:$port");
-+ }
- } else {
-- $sd = IO::Socket::INET->new(
-- PeerAddr => $peer,
-- PeerPort => $port,
-- Proto => 'tcp',
-- MultiHomed => 1,
-- Timeout => opt('timeout'),
-- );
-- defined $sd or warning("cannot connect to $peer:$port socket: $@");
-- }
-+ $0 = sprintf("%s - curl (non-SSL) sending to %s port %s", $program, $peer, $port);
-+ my $timeout = opt('timeout');
-
-- if (defined $sd) {
-- ## send the request to the http server
-- verbose("CONNECTED: ", $use_ssl ? 'using SSL' : 'using HTTP');
-- verbose("SENDING:", "%s", $request);
--
-- $0 = sprintf("%s - sending to %s port %s", $program, $peer, $port);
-- my $result = syswrite $sd, $rq;
-- if ($result != length($rq)) {
-- warning("cannot send to $peer:$port ($!).");
-- } else {
-- $0 = sprintf("%s - reading from %s port %s", $program, $peer, $port);
-- eval {
-- local $SIG{'ALRM'} = sub { die "timeout";};
-- alarm(opt('timeout')) if opt('timeout') > 0;
-- while ($_ = <$sd>) {
-- $0 = sprintf("%s - read from %s port %s", $program, $peer, $port);
-- verbose("RECEIVE:", "%s", define($_, "<undefined>"));
-- $reply .= $_ if defined $_;
-- }
-- if (opt('timeout') > 0) {
-- alarm(0);
-- }
-- };
-- close($sd);
--
-- if ($@ and $@ =~ /timeout/) {
-- warning("TIMEOUT: %s after %s seconds", $to, opt('timeout'));
-- $reply = '';
-- }
-- $reply = '' if !defined $reply;
-- }
-- }
-- $0 = sprintf("%s - closed %s port %s", $program, $peer, $port);
-+ $reply = <<`CURL`;
-+/usr/bin/curl -si0 --user '${login}:${password}' --user-agent '${program}/${version}' \\
-+ --connect-timeout $timeout --max-time $timeout \\
-+ --url 'http://${server}/${url}' 2>/dev/null
-+CURL
-+
-+ if (! $reply) {
-+ warning("curl (non-SSL) cannot connect to $peer:$port");
-+ }
-+ }
-
- ## during testing simulate reading the URL
- if (opt('test')) {
Deleted: branches/1.0/package/ddclient/ddclient-21-cloudflare-ttl.patch
===================================================================
--- branches/1.0/package/ddclient/ddclient-21-cloudflare-ttl.patch 2017-01-28 20:26:14 UTC (rev 8130)
+++ branches/1.0/package/ddclient/ddclient-21-cloudflare-ttl.patch 2017-01-29 00:14:33 UTC (rev 8131)
@@ -1,23 +0,0 @@
-diff --git a/ddclient b/ddclient
-index a39fcf0..e1e86e5 100755
---- a/ddclient
-+++ b/ddclient
-@@ -445,6 +445,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),
-@@ -4083,7 +4084,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;
-
Deleted: branches/1.0/package/ddclient/ddclient-22-cloudflare-api-v4.patch
===================================================================
--- branches/1.0/package/ddclient/ddclient-22-cloudflare-api-v4.patch 2017-01-28 20:26:14 UTC (rev 8130)
+++ branches/1.0/package/ddclient/ddclient-22-cloudflare-api-v4.patch 2017-01-29 00:14:33 UTC (rev 8131)
@@ -1,147 +0,0 @@
---- a/ddclient 2017-01-19 11:36:50.208744563 -0600
-+++ b/ddclient 2017-01-19 11:35:44.265920224 -0600
-@@ -439,7 +439,7 @@
- 'zone' => setv(T_STRING, 1, 1, 1, '', undef),
- },
- 'cloudflare-common-defaults' => {
-- 'server' => setv(T_FQDNP, 1, 0, 1, 'www.cloudflare.com', undef),
-+ 'server' => setv(T_FQDNP, 1, 0, 1, 'api.cloudflare.com/client/v4', undef),
- 'zone' => setv(T_FQDN, 1, 0, 1, '', undef),
- 'static' => setv(T_BOOL, 0, 1, 1, 0, undef),
- 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef),
-@@ -613,7 +613,7 @@
- 'update' => \&nic_cloudflare_update,
- 'examples' => \&nic_cloudflare_examples,
- 'variables' => merge(
-- { 'server' => setv(T_FQDNP, 1, 0, 1, 'www.cloudflare.com', undef) },
-+ { 'server' => setv(T_FQDNP, 1, 0, 1, 'api.cloudflare.com/client/v4', undef) },
- { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),},
- $variables{'cloudflare-common-defaults'},
- $variables{'service-common-defaults'},
-@@ -1894,6 +1894,9 @@
- my $url = shift || '';
- my $login = shift || '';
- my $password = shift || '';
-+ my $headers = shift || '';
-+ my $method = shift || 'GET';
-+ my $data = shift || '';
- my ($peer, $server, $port, $default_port, $use_ssl);
- my ($sd, $rq, $request, $reply);
-
-@@ -1934,7 +1937,7 @@
- my $to = sprintf "%s%s", $server, $proxy ? " via proxy $peer:$port" : "";
- verbose("CONNECT:", "%s", $to);
-
-- $request = "GET ";
-+ $request = "$method ";
- $request .= "http://$server" if $proxy;
- $request .= "/$url HTTP/1.0\n";
- $request .= "Host: $server\n";
-@@ -1943,7 +1946,10 @@
- $request .= "Authorization: Basic $auth\n" if $login || $password;
- $request .= "User-Agent: ${program}/${version}\n";
- $request .= "Connection: close\n";
-+ $request .= "$headers\n";
-+ $request .= "Content-Length: ".length($data)."\n" if $data;
- $request .= "\n";
-+ $request .= $data;
-
- ## make sure newlines are <cr><lf> for some pedantic proxy servers
- ($rq = $request) =~ s/\n/\r\n/g;
-@@ -4010,7 +4016,7 @@
-
- Configuration variables applicable to the 'cloudflare' protocol are:
- protocol=cloudflare ##
-- server=fqdn.of.service ## defaults to www.cloudflare.com
-+ server=fqdn.of.service ## defaults to api.cloudflare.com/client/v4
- login=service-login ## login name and password registered with the service
- password=service-password ##
- fully.qualified.host ## the host registered with the service.
-@@ -4047,6 +4053,10 @@
- my $key = $hosts[0];
- my $ip = $config{$key}{'wantip'};
-
-+ my $headers = "X-Auth-Email: $config{$key}{'login'}\n";
-+ $headers .= "X-Auth-Key: $config{$key}{'password'}\n";
-+ $headers .= "Content-Type: application/json";
-+
- # FQDNs
- for my $domain (@hosts) {
- (my $hostname = $domain) =~ s/\.$config{$key}{zone}$//;
-@@ -4055,13 +4065,11 @@
- info("setting IP address to %s for %s", $ip, $domain);
- verbose("UPDATE:","updating %s", $domain);
-
-- # Get domain ID
-- my $url = "https://$config{$key}{'server'}/api_json.html?a=rec_load_all";
-- $url .= "&z=".$config{$key}{'zone'};
-- $url .= "&email=".$config{$key}{'login'};
-- $url .= "&tkn=".$config{$key}{'password'};
-+ # Get zone ID
-+ my $url = "https://$config{$key}{'server'}/zones?";
-+ $url .= "name=".$config{$key}{'zone'};
-
-- my $reply = geturl(opt('proxy'), $url);
-+ my $reply = geturl(opt('proxy'), $url, undef, undef, $headers);
- unless ($reply) {
- failed("updating %s: Could not connect to %s.", $domain, $config{$key}{'server'});
- last;
-@@ -4077,24 +4085,44 @@
- }
-
- # Pull the ID out of the json, messy
-- my ($id) = map { $_->{name} eq $domain ? $_->{rec_id} : () } @{ $response->{response}->{recs}->{objs} };
-- unless($id) {
-- failed("updating %s: No domain ID found.", $domain);
-+ my ($zone_id) = map { $_->{name} eq $config{$key}{'zone'} ? $_->{id} : () } @{ $response->{result} };
-+ unless($zone_id) {
-+ failed("updating %s: No zone ID found.", $config{$key}{'zone'});
- next;
- }
-+ info("zone ID is $zone_id");
-
-- # Set domain
-- $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;
-- $url .= "&email=".$config{$key}{'login'};
-- $url .= "&tkn=".$config{$key}{'password'};
-- $url .= "&content=";
-- $url .= "$ip" if $ip;
-+ # Get DNS record ID
-+ $url = "https://$config{$key}{'server'}/zones/$zone_id/dns_records?";
-+ $url .= "type=A&name=$domain";
-+
-+ $reply = geturl(opt('proxy'), $url, undef, undef, $headers);
-+ unless ($reply) {
-+ failed("updating %s: Could not connect to %s.", $domain, $config{$key}{'server'});
-+ last;
-+ }
-+ last if !header_ok($domain, $reply);
-+
-+ # Strip header
-+ $reply =~ s/^.*?\n\n//s;
-+ $response = JSON::Any->jsonToObj($reply);
-+ if ($response->{result} eq 'error') {
-+ failed ("%s", $response->{msg});
-+ next;
-+ }
-
-- $reply = geturl(opt('proxy'), $url);
-+ # Pull the ID out of the json, messy
-+ my ($dns_rec_id) = map { $_->{name} eq $domain ? $_->{id} : () } @{ $response->{result} };
-+ unless($dns_rec_id) {
-+ failed("updating %s: No DNS record ID found.", $domain);
-+ next;
-+ }
-+ info("DNS record ID is $dns_rec_id");
-+
-+ # Set domain
-+ $url = "https://$config{$key}{'server'}/zones/$zone_id/dns_records/$dns_rec_id";
-+ my $data = "{\"content\":\"$ip\"}";
-+ $reply = geturl(opt('proxy'), $url, undef, undef, $headers, "PATCH", $data);
- unless ($reply) {
- failed("updating %s: Could not connect to %s.", $domain, $config{$domain}{'server'});
- last;
Deleted: branches/1.0/package/ddclient/ddclient-23-cloudflare-curl-headers.patch
===================================================================
--- branches/1.0/package/ddclient/ddclient-23-cloudflare-curl-headers.patch 2017-01-28 20:26:14 UTC (rev 8130)
+++ branches/1.0/package/ddclient/ddclient-23-cloudflare-curl-headers.patch 2017-01-29 00:14:33 UTC (rev 8131)
@@ -1,29 +0,0 @@
---- a/ddclient
-+++ b/ddclient
-@@ -1959,6 +1959,26 @@
- if (! opt('exec')) {
- debug("skipped network connection");
- verbose("SENDING:", "%s", $request);
-+ } elsif (($headers ne '')) {
-+ $0 = sprintf("%s - curl (SSL w/headers) sending to %s port %s", $program, $peer, $port);
-+ my $timeout = opt('timeout');
-+ my @head_lines = split('\n', $headers);
-+ my $head_args = '';
-+ foreach my $head_line (@head_lines) {
-+ $head_args .= "-H '$head_line' ";
-+ }
-+
-+ $reply = <<`CURL_SSL_HEADERS`;
-+/usr/bin/curl -si0 -X $method --user-agent '${program}/${version}' \\
-+ --connect-timeout $timeout --max-time $timeout \\
-+ ${head_args} \\
-+ --data '${data}' \\
-+ --url 'https://${server}/${url}' 2>/dev/null
-+CURL_SSL_HEADERS
-+
-+ if (! $reply) {
-+ warning("curl (SSL w/headers) cannot connect to $peer:$port");
-+ }
- } elsif ($use_ssl) {
- $0 = sprintf("%s - curl (SSL) sending to %s port %s", $program, $peer, $port);
- my $timeout = opt('timeout');
Deleted: branches/1.0/package/ddclient/ddclient-24-cloudflare-JSON-PP.patch
===================================================================
--- branches/1.0/package/ddclient/ddclient-24-cloudflare-JSON-PP.patch 2017-01-28 20:26:14 UTC (rev 8130)
+++ branches/1.0/package/ddclient/ddclient-24-cloudflare-JSON-PP.patch 2017-01-29 00:14:33 UTC (rev 8131)
@@ -1,58 +0,0 @@
---- a/ddclient 2017-01-20 09:04:33.026792149 -0600
-+++ b/ddclient 2017-01-20 09:06:01.478773577 -0600
-@@ -1878,13 +1878,13 @@
- ## load_json_support
- ######################################################################
- sub load_json_support {
-- my $json_loaded = eval {require JSON::Any};
-+ my $json_loaded = eval {require JSON::PP};
- unless ($json_loaded) {
- fatal(<<"EOM");
--Error loading the Perl module JSON::Any needed for cloudflare update.
-+Error loading the Perl module JSON::PP needed for cloudflare update.
- EOM
- }
-- import JSON::Any;
-+ import JSON::PP (qw/decode_json/);
- }
- ######################################################################
- ## geturl
-@@ -4098,9 +4098,9 @@
-
- # Strip header
- $reply =~ s/^.*?\n\n//s;
-- my $response = JSON::Any->jsonToObj($reply);
-- if ($response->{result} eq 'error') {
-- failed ("%s", $response->{msg});
-+ my $response = eval {decode_json($reply)};
-+ if (!defined $response || !defined $response->{result}) {
-+ failed ("invalid json or result.");
- next;
- }
-
-@@ -4125,9 +4125,9 @@
-
- # Strip header
- $reply =~ s/^.*?\n\n//s;
-- $response = JSON::Any->jsonToObj($reply);
-- if ($response->{result} eq 'error') {
-- failed ("%s", $response->{msg});
-+ $response = eval {decode_json($reply)};
-+ if (!defined $response || !defined $response->{result}) {
-+ failed ("invalid json or result.");
- next;
- }
-
-@@ -4151,9 +4151,9 @@
-
- # Strip header
- $reply =~ s/^.*?\n\n//s;
-- $response = JSON::Any->jsonToObj($reply);
-- if ($response->{result} eq 'error') {
-- failed ("%s", $response->{msg});
-+ $response = eval {decode_json($reply)};
-+ if (!defined $response || !defined $response->{result}) {
-+ failed ("invalid json or result.");
- } else {
- success ("%s -- Updated Successfully to %s", $domain, $ip);
-
Modified: branches/1.0/package/ddclient/ddclient.conf
===================================================================
--- branches/1.0/package/ddclient/ddclient.conf 2017-01-28 20:26:14 UTC (rev 8130)
+++ branches/1.0/package/ddclient/ddclient.conf 2017-01-29 00:14:33 UTC (rev 8131)
@@ -1,6 +1,8 @@
daemon=@DELAY@
@USE_WEB@use=web, web=@WEB_STR@
@USE_IF@use=if, if=@EXTIF@
+@USEV6_WEB@usev6=web, webv6=@WEBV6_STR@
+@USEV6_IF@usev6=if, if=@EXTIF@
#@zoneedit@>
#@zoneedit@>## ZoneEdit
#@zoneedit@>ssl=yes
@@ -121,4 +123,11 @@
#@cloudflare@>login=@DDUSER@
#@cloudflare@>password=@DDPASS@
#@cloudflare@>@DDHOST@
+#@he@>
+#@he@>## Hurricane Electric
+#@he@>ssl=yes
+#@he@>protocol=he
+#@he@>login=@DDUSER@
+#@he@>password=@DDPASS@
+#@he@>@DDHOST@
Modified: branches/1.0/package/ddclient/ddclient.mk
===================================================================
--- branches/1.0/package/ddclient/ddclient.mk 2017-01-28 20:26:14 UTC (rev 8130)
+++ branches/1.0/package/ddclient/ddclient.mk 2017-01-29 00:14:33 UTC (rev 8131)
@@ -3,9 +3,9 @@
# ddclient
#
#############################################################
-DDCLIENT_VERSION = 3.8.3
-DDCLIENT_SOURCE = ddclient-$(DDCLIENT_VERSION).tar.gz
-DDCLIENT_SITE = http://downloads.sourceforge.net/project/ddclient/ddclient/ddclient-$(DDCLIENT_VERSION)
+DDCLIENT_VERSION = 3.8.3-01
+DDCLIENT_SOURCE = ddclient-curl-$(DDCLIENT_VERSION).tar.gz
+DDCLIENT_SITE = https://github.com/astlinux-project/ddclient-curl/releases/download/$(DDCLIENT_VERSION)
define DDCLIENT_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 -D package/ddclient/dynamicdns.init $(TARGET_DIR)/etc/init.d/dynamicdns
Modified: branches/1.0/package/ddclient/dynamicdns.init
===================================================================
--- branches/1.0/package/ddclient/dynamicdns.init 2017-01-28 20:26:14 UTC (rev 8130)
+++ branches/1.0/package/ddclient/dynamicdns.init 2017-01-29 00:14:33 UTC (rev 8131)
@@ -4,7 +4,8 @@
gen_ddclient_conf()
{
- local use_web="" use_if="#" web_str delay domain service
+ local use_web="#" use_if="#" web_str delay domain service
+ local usev6_web="#" usev6_if="#" webv6_str
if [ ! -x /usr/sbin/ddclient ]; then
echo "dynamicdns: Script \"/usr/sbin/ddclient\" not found, exiting." >&2
@@ -14,18 +15,38 @@
delay="360"
if [ -z "$DDGETIP" -o "$DDGETIP" = "getip.krisk.org" ]; then
+ use_web=""
web_str="myip.dnsomatic.com/"
elif [ "$DDGETIP" = "interface" ]; then
- use_web="#"
use_if=""
- web_str="$DDGETIP/"
+ web_str=""
delay="120"
elif [ "$DDGETIP" = "checkip.dyndns.org" -o "$DDGETIP" = "checkip.dyndns.com" ]; then
+ use_web=""
web_str="$DDGETIP/, web-skip='IP Address'"
else
- web_str="$DDGETIP/"
+ use_web=""
+ case "$DDGETIP" in
+ dyndns|dnspark|he|whatismyv6|nsupdate.info) # builtinweb entries
+ web_str="$DDGETIP" ;;
+ *) web_str="$DDGETIP/" ;;
+ esac
fi
+ if [ -z "$DDGETIPV6" -o "$DDGETIPV6" = "no" ]; then
+ webv6_str=""
+ elif [ "$DDGETIPV6" = "interface" ]; then
+ usev6_if=""
+ webv6_str=""
+ else
+ usev6_web=""
+ case "$DDGETIPV6" in
+ dyndns|dnspark|he|whatismyv6|nsupdate.info) # builtinweb entries
+ webv6_str="$DDGETIPV6" ;;
+ *) webv6_str="$DDGETIPV6/" ;;
+ esac
+ fi
+
# extract the root domain of DDHOST, used by some providers like Cloudflare
domain="$(echo $DDHOST | sed -n -r -e 's/^(.*\.|)([^.]+)\.([^.]+)$/\2.\3/p')"
@@ -71,6 +92,9 @@
-e "s|@USE_WEB@|${use_web}|g" \
-e "s|@USE_IF@|${use_if}|g" \
-e "s|@WEB_STR@|${web_str}|g" \
+ -e "s|@USEV6_WEB@|${usev6_web}|g" \
+ -e "s|@USEV6_IF@|${usev6_if}|g" \
+ -e "s|@WEBV6_STR@|${webv6_str}|g" \
/tmp/etc/ddclient.conf
chmod 600 /tmp/etc/ddclient.conf
Modified: branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf
===================================================================
--- branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2017-01-28 20:26:14 UTC (rev 8130)
+++ branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2017-01-29 00:14:33 UTC (rev 8131)
@@ -211,10 +211,15 @@
#DDUSER=
#DDPASS=
#DDHOST=
-## If DDGETIP is not defined, myip.dnsomatic.com is queried to determine the public IP address.
-## If DDGETIP is set to "interface", the IP address of the interface EXTIF will be used.
-## Else, DDGETIP can be set to any web server that returns your public IP address.
+## If DDGETIP is not defined, myip.dnsomatic.com is queried to determine the public IPv4 address.
+## If DDGETIP is set to "interface", the IPv4 address of the interface EXTIF will be used.
+## Else, DDGETIP can be set to any web server that returns your public IPv4 address.
#DDGETIP="interface"
+## If DDGETIPV6="no" or is not defined, IPv6 dynamic DNS will not be enabled.
+## If DDGETIPV6 is set to "interface", the IPv6 address of the interface EXTIF will be used.
+## Else, DDGETIPV6 can be set to any web server that returns your public IPv6 address.
+## Note: Not all DDSERVICE types support both IPv4 and IPv6
+#DDGETIPV6="interface"
## IPv6 Support
## AstLinux supports IPv6 but the kernel autoloader is
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|