ddns.fm: Improve log messages
This commit is contained in:
parent
1195a40c45
commit
d62495c41e
1 changed files with 3 additions and 4 deletions
|
@ -6473,21 +6473,20 @@ sub nic_ddnsfm_update {
|
||||||
# - IPv6 updates do not affect the IPv4 A record (if present).
|
# - IPv6 updates do not affect the IPv4 A record (if present).
|
||||||
for my $ipv ('4', '6') {
|
for my $ipv ('4', '6') {
|
||||||
my $ip = delete $config{$h}{"wantipv$ipv"} or next;
|
my $ip = delete $config{$h}{"wantipv$ipv"} or next;
|
||||||
info("setting IPv$ipv address to $ip for $h");
|
info("$h: setting IPv$ipv address to $ip");
|
||||||
verbose("UPDATE:", "updating %s", $h);
|
|
||||||
my $reply = geturl(
|
my $reply = geturl(
|
||||||
proxy => opt('proxy'),
|
proxy => opt('proxy'),
|
||||||
url => "$config{$h}{server}/update?key=$config{$h}{password}&domain=$h&myip=$ip",
|
url => "$config{$h}{server}/update?key=$config{$h}{password}&domain=$h&myip=$ip",
|
||||||
);
|
);
|
||||||
if (!$reply) {
|
if (!$reply) {
|
||||||
failed("updating %s: Could not connect to %s.", $h, $config{$h}{'server'});
|
failed("$h: Request to $config{$h}{'server'} failed");
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
next if !header_ok($h, $reply);
|
next if !header_ok($h, $reply);
|
||||||
$config{$h}{"ipv$ipv"} = $ip;
|
$config{$h}{"ipv$ipv"} = $ip;
|
||||||
$config{$h}{'mtime'} = $now;
|
$config{$h}{'mtime'} = $now;
|
||||||
$config{$h}{"status-ipv$ipv"} = 'good';
|
$config{$h}{"status-ipv$ipv"} = 'good';
|
||||||
success("updating $h: good: IPv$ipv address set to $ip");
|
success("$h: IPv$ipv address set to $ip");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue