Merge pull request #679 from rhansen/dnsexit2
dnsexit2: Minor fixes and improvements
This commit is contained in:
commit
86ec02a9b6
1 changed files with 3 additions and 5 deletions
|
@ -4190,7 +4190,7 @@ sub nic_dnsexit2_update {
|
||||||
ttl => $config{$h}{'ttl'},
|
ttl => $config{$h}{'ttl'},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
my $url = "https://$config{$h}{'server'}$config{$h}{'path'}";
|
my $url = $config{$h}{'server'} . $config{$h}{'path'};
|
||||||
my $reply = geturl(
|
my $reply = geturl(
|
||||||
proxy => opt('proxy'),
|
proxy => opt('proxy'),
|
||||||
url => $url,
|
url => $url,
|
||||||
|
@ -4203,7 +4203,7 @@ sub nic_dnsexit2_update {
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
unless ($reply && header_ok($h, $reply)) {
|
unless ($reply && header_ok($h, $reply)) {
|
||||||
failed("updating %s: Could not connect to %s%s.", $h, $url);
|
failed("updating %s: Could not connect to %s", $h, $url);
|
||||||
last;
|
last;
|
||||||
};
|
};
|
||||||
debug("%s", $reply);
|
debug("%s", $reply);
|
||||||
|
@ -4250,8 +4250,6 @@ sub nic_dnsexit2_update {
|
||||||
info("Status: %s -- Message: %s", $status, $message);
|
info("Status: %s -- Message: %s", $status, $message);
|
||||||
info("Server Message: %s -- Server Details: %s", $response->{'message'},
|
info("Server Message: %s -- Server Details: %s", $response->{'message'},
|
||||||
defined($response->{'details'}) ? $response->{'details'}[0] : "no details received");
|
defined($response->{'details'}) ? $response->{'details'}[0] : "no details received");
|
||||||
$config{$h}{'status-ipv4'} = $status if $ips{'4'};
|
|
||||||
$config{$h}{'status-ipv6'} = $status if $ips{'6'};
|
|
||||||
if ($status ne 'good') {
|
if ($status ne 'good') {
|
||||||
if ($status eq 'warning') {
|
if ($status eq 'warning') {
|
||||||
warning("%s", $message);
|
warning("%s", $message);
|
||||||
|
@ -4260,7 +4258,7 @@ sub nic_dnsexit2_update {
|
||||||
failed("%s", $message);
|
failed("%s", $message);
|
||||||
failed("Server response: %s", $response->{'message'});
|
failed("Server response: %s", $response->{'message'});
|
||||||
} else {
|
} else {
|
||||||
failed("This should not be possible");
|
failed("Unexpected status: %s", $status);
|
||||||
}
|
}
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue