Revert "Merge branch 'github'"
This reverts commit38f9762e2c
, reversing changes made to5bea1a58f7
.
This commit is contained in:
parent
38f9762e2c
commit
eafb707437
2 changed files with 31 additions and 34 deletions
|
@ -1,5 +1,5 @@
|
||||||
===============================================================================
|
===============================================================================
|
||||||
# DDCLIENT v3.8.3
|
# DDCLIENT v3.8.2
|
||||||
|
|
||||||
ddclient is a Perl client used to update dynamic DNS entries for accounts
|
ddclient is a Perl client used to update dynamic DNS entries for accounts
|
||||||
on many dynamic DNS services.
|
on many dynamic DNS services.
|
||||||
|
|
63
ddclient
63
ddclient
|
@ -3704,7 +3704,10 @@ EoEXAMPLE
|
||||||
##
|
##
|
||||||
######################################################################
|
######################################################################
|
||||||
sub nic_freedns_update {
|
sub nic_freedns_update {
|
||||||
|
|
||||||
|
|
||||||
debug("\nnic_freedns_update -------------------");
|
debug("\nnic_freedns_update -------------------");
|
||||||
|
|
||||||
## First get the list of updatable hosts
|
## First get the list of updatable hosts
|
||||||
my $url;
|
my $url;
|
||||||
$url = "http://$config{$_[0]}{'server'}/api/?action=getdyndns&sha=".&sha1_hex("$config{$_[0]}{'login'}|$config{$_[0]}{'password'}");
|
$url = "http://$config{$_[0]}{'server'}/api/?action=getdyndns&sha=".&sha1_hex("$config{$_[0]}{'login'}|$config{$_[0]}{'password'}");
|
||||||
|
@ -3730,40 +3733,34 @@ sub nic_freedns_update {
|
||||||
info("setting IP address to %s for %s", $ip, $h);
|
info("setting IP address to %s for %s", $ip, $h);
|
||||||
verbose("UPDATE:","updating %s", $h);
|
verbose("UPDATE:","updating %s", $h);
|
||||||
|
|
||||||
if($ip eq $freedns_hosts{$h}->[1]) {
|
if($ip eq $freedns_hosts{$h}->[1]) {
|
||||||
$config{$h}{'ip'} = $ip;
|
$config{$h}{'ip'} = $ip;
|
||||||
$config{$h}{'mtime'} = $now;
|
$config{$h}{'mtime'} = $now;
|
||||||
$config{$h}{'status'} = 'good';
|
$config{$h}{'status'} = 'good';
|
||||||
success("update not necessary %s: good: IP address already set to %s", $h, $ip);
|
success("update not necessary %s: good: IP address already set to %s", $h, $ip);
|
||||||
} else {
|
} else {
|
||||||
my $reply = geturl(opt('proxy'), $freedns_hosts{$h}->[2]);
|
my $reply = geturl(opt('proxy'), $freedns_hosts{$h}->[2]);
|
||||||
if (!defined($reply) || !$reply) {
|
if (!defined($reply) || !$reply) {
|
||||||
failed("updating %s: Could not connect to %s.", $h, $freedns_hosts{$h}->[2]);
|
failed("updating %s: Could not connect to %s.", $h, $freedns_hosts{$h}->[2]);
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
if(!header_ok($h, $reply)) {
|
if(!header_ok($h, $reply)) {
|
||||||
$config{$h}{'status'} = 'failed';
|
$config{$h}{'status'} = 'failed';
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($reply =~ /Updated.*$h.*to.*$ip/) {
|
if($reply =~ /Updated.*$h.*to.*$ip/) {
|
||||||
$config{$h}{'ip'} = $ip;
|
$config{$h}{'ip'} = $ip;
|
||||||
$config{$h}{'mtime'} = $now;
|
$config{$h}{'mtime'} = $now;
|
||||||
$config{$h}{'status'} = 'good';
|
$config{$h}{'status'} = 'good';
|
||||||
success("updating %s: good: IP address set to %s", $h, $ip);
|
success("updating %s: good: IP address set to %s", $h, $ip);
|
||||||
} elsif ($reply =~ /Address (\d+\.\d+\.\d+\.\d+) has not changed/) {
|
} else {
|
||||||
$ip = $1;
|
$config{$h}{'status'} = 'failed';
|
||||||
$config{$h}{'mtime'} = $now;
|
warning("SENT: %s", $freedns_hosts{$h}->[2]) unless opt('verbose');
|
||||||
$config{$h}{'status'} = 'good';
|
warning("REPLIED: %s", $reply);
|
||||||
$config{$h}{'ip'} = $ip;
|
failed("updating %s: Invalid reply.", $h);
|
||||||
success("updating %s: good: IP address %s has not changed", $h, $ip);
|
}
|
||||||
} else {
|
}
|
||||||
$config{$h}{'status'} = 'failed';
|
|
||||||
warning("SENT: %s", $freedns_hosts{$h}->[2]) unless opt('verbose');
|
|
||||||
warning("REPLIED: %s", $reply);
|
|
||||||
failed("updating %s: Invalid reply.", $h);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue