duckdns: Invert condition to improve readability
This commit is contained in:
parent
91fd9e3842
commit
1eccfb8c77
1 changed files with 9 additions and 9 deletions
12
ddclient.in
12
ddclient.in
|
@ -6360,7 +6360,12 @@ sub nic_duckdns_update {
|
|||
next;
|
||||
};
|
||||
chomp($body);
|
||||
if ($body eq 'OK') {
|
||||
if ($body ne 'OK') {
|
||||
$config{$h}{'status-ipv4'} = 'failed' if $ipv4;
|
||||
$config{$h}{'status-ipv6'} = 'failed' if $ipv6;
|
||||
failed("updating %s: Server said: '%s'", $h, $body);
|
||||
next;
|
||||
}
|
||||
$config{$h}{'ipv4'} = $ipv4 if $ipv4;
|
||||
$config{$h}{'ipv6'} = $ipv6 if $ipv6;
|
||||
$config{$h}{'mtime'} = $now;
|
||||
|
@ -6368,11 +6373,6 @@ sub nic_duckdns_update {
|
|||
$config{$h}{'status-ipv6'} = 'good' if $ipv6;
|
||||
success("updating %s: good: IPv4 address set to %s", $h, $ipv4) if $ipv4;
|
||||
success("updating %s: good: IPv6 address set to %s", $h, $ipv6) if $ipv6;
|
||||
} else {
|
||||
$config{$h}{'status-ipv4'} = 'failed' if $ipv4;
|
||||
$config{$h}{'status-ipv6'} = 'failed' if $ipv6;
|
||||
failed("updating %s: Server said: '%s'", $h, $body);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue