dnsmadeeasy: Improve log messages
This commit is contained in:
parent
c79d12263e
commit
11876498d5
1 changed files with 4 additions and 5 deletions
|
@ -6589,8 +6589,7 @@ sub nic_dnsmadeeasy_update {
|
||||||
);
|
);
|
||||||
for my $h (@_) {
|
for my $h (@_) {
|
||||||
my $ip = delete $config{$h}{'wantip'};
|
my $ip = delete $config{$h}{'wantip'};
|
||||||
info("Setting IP address to %s for %s", $ip, $h);
|
info("$h: Setting IP address to $ip");
|
||||||
verbose("UPDATE:", "Updating %s", $h);
|
|
||||||
my $url = $config{$h}{'server'} . $config{$h}{'script'};
|
my $url = $config{$h}{'server'} . $config{$h}{'script'};
|
||||||
$url .= "?username=$config{$h}{'login'}";
|
$url .= "?username=$config{$h}{'login'}";
|
||||||
$url .= "&password=$config{$h}{'password'}";
|
$url .= "&password=$config{$h}{'password'}";
|
||||||
|
@ -6598,7 +6597,7 @@ sub nic_dnsmadeeasy_update {
|
||||||
$url .= "&id=$h";
|
$url .= "&id=$h";
|
||||||
my $reply = geturl(proxy => opt('proxy'), url => $url);
|
my $reply = geturl(proxy => opt('proxy'), url => $url);
|
||||||
if (!defined($reply) || !$reply) {
|
if (!defined($reply) || !$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);
|
||||||
|
@ -6608,10 +6607,10 @@ sub nic_dnsmadeeasy_update {
|
||||||
$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("$h: IP address set to $ip");
|
||||||
} else {
|
} else {
|
||||||
$config{$h}{'status'} = 'failed';
|
$config{$h}{'status'} = 'failed';
|
||||||
failed("Updating %s: Server said: '%s': %s", $h, $returned, $messages{$returned});
|
failed("$h: Server said: $returned: $messages{$returned}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue