duckdns: Invert condition to improve readability
This commit is contained in:
parent
91fd9e3842
commit
1eccfb8c77
1 changed files with 9 additions and 9 deletions
18
ddclient.in
18
ddclient.in
|
@ -6360,19 +6360,19 @@ sub nic_duckdns_update {
|
||||||
next;
|
next;
|
||||||
};
|
};
|
||||||
chomp($body);
|
chomp($body);
|
||||||
if ($body eq 'OK') {
|
if ($body ne 'OK') {
|
||||||
$config{$h}{'ipv4'} = $ipv4 if $ipv4;
|
|
||||||
$config{$h}{'ipv6'} = $ipv6 if $ipv6;
|
|
||||||
$config{$h}{'mtime'} = $now;
|
|
||||||
$config{$h}{'status-ipv4'} = 'good' if $ipv4;
|
|
||||||
$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-ipv4'} = 'failed' if $ipv4;
|
||||||
$config{$h}{'status-ipv6'} = 'failed' if $ipv6;
|
$config{$h}{'status-ipv6'} = 'failed' if $ipv6;
|
||||||
failed("updating %s: Server said: '%s'", $h, $body);
|
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;
|
||||||
|
$config{$h}{'status-ipv4'} = 'good' if $ipv4;
|
||||||
|
$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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue