Don't issue warnings when freedns IP didn't change
Before this update, freedns warnings would appear in the log even though FreeDNS sent back a code 200 with a message indicating the IP address was already correct. A simple regex change was all that was needed to make this a success instead. Now, it looks like this: DEBUG: server = freedns.afraid.org SUCCESS: updating xxx.xxx.xxx good: IP address has not changed Conflicts: ddclient
This commit is contained in:
parent
a2ea922aa3
commit
b478bf1a85
2 changed files with 30 additions and 31 deletions
|
@ -1,5 +1,5 @@
|
||||||
===============================================================================
|
===============================================================================
|
||||||
# DDCLIENT v3.8.2
|
# DDCLIENT v3.8.3
|
||||||
|
|
||||||
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.
|
||||||
|
|
5
ddclient
5
ddclient
|
@ -3704,10 +3704,7 @@ 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'}");
|
||||||
|
@ -3754,6 +3751,8 @@ sub nic_freedns_update {
|
||||||
$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 .* has not changed/) {
|
||||||
|
success("updating %s: good: IP address has not changed", $h, $ip);
|
||||||
} else {
|
} else {
|
||||||
$config{$h}{'status'} = 'failed';
|
$config{$h}{'status'} = 'failed';
|
||||||
warning("SENT: %s", $freedns_hosts{$h}->[2]) unless opt('verbose');
|
warning("SENT: %s", $freedns_hosts{$h}->[2]) unless opt('verbose');
|
||||||
|
|
Loading…
Reference in a new issue