Merge pull request #487 from pekkanikander/master
This commit is contained in:
commit
086093839d
1 changed files with 13 additions and 6 deletions
19
ddclient.in
19
ddclient.in
|
@ -4760,10 +4760,12 @@ sub nic_easydns_update {
|
|||
my @hosts = @{$groups{$sig}};
|
||||
my $hosts = join(',', @hosts);
|
||||
my $h = $hosts[0];
|
||||
my $ip = $config{$h}{'wantip'};
|
||||
delete $config{$_}{'wantip'} foreach @hosts;
|
||||
my $ipv4 = $config{$h}{'wantipv4'};
|
||||
my $ipv6 = $config{$h}{'wantipv6'};
|
||||
delete $config{$_}{'wantipv4'} foreach @hosts;
|
||||
delete $config{$_}{'wantipv6'} foreach @hosts;
|
||||
|
||||
info("setting IP address to %s for %s", $ip, $hosts);
|
||||
info("setting IP address to %s %s for %s", $ipv4, $ipv6, $hosts);
|
||||
verbose("UPDATE:", "updating %s", $hosts);
|
||||
|
||||
#'https://api.cp.easydns.com/dyn/generic.php?hostname=test.burry.ca&myip=10.20.30.40&wildcard=ON'
|
||||
|
@ -4772,7 +4774,11 @@ sub nic_easydns_update {
|
|||
$url = "https://$config{$h}{'server'}$config{$h}{'script'}?";
|
||||
$url .= "hostname=$hosts";
|
||||
$url .= "&myip=";
|
||||
$url .= $ip if $ip;
|
||||
$url .= $ipv4 if $ipv4;
|
||||
foreach my $ipv6a ($ipv6) {
|
||||
$url .= "&myip=";
|
||||
$url .= $ipv6a
|
||||
}
|
||||
$url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'ON', 'OFF', 'OFF') if defined $config{$h}{'wildcard'};
|
||||
|
||||
if ($config{$h}{'mx'}) {
|
||||
|
@ -4809,9 +4815,10 @@ sub nic_easydns_update {
|
|||
|
||||
$config{$h}{'status'} = $status;
|
||||
if ($status eq 'NOERROR') {
|
||||
$config{$h}{'ip'} = $ip;
|
||||
$config{$h}{'ipv4'} = $ipv4;
|
||||
$config{$h}{'ipv6'} = $ipv6;
|
||||
$config{$h}{'mtime'} = $now;
|
||||
success("updating %s: %s: IP address set to %s", $h, $status, $ip);
|
||||
success("updating %s: %s: IP address set to %s %s", $h, $status, $ipv4, $ipv6);
|
||||
|
||||
} elsif ($status =~ /TOOSOON/) {
|
||||
## make sure we wait at least a little
|
||||
|
|
Loading…
Reference in a new issue