easydns: Consolidate lines for readability
This commit is contained in:
parent
6992a34028
commit
fb990208b3
1 changed files with 6 additions and 13 deletions
19
ddclient.in
19
ddclient.in
|
@ -4802,20 +4802,13 @@ sub nic_easydns_update {
|
||||||
info("$h: setting IPv4 address to $ipv4") if $ipv4;
|
info("$h: setting IPv4 address to $ipv4") if $ipv4;
|
||||||
info("$h: setting IPv6 address to $ipv6") if $ipv6;
|
info("$h: setting IPv6 address to $ipv6") if $ipv6;
|
||||||
#'https://api.cp.easydns.com/dyn/generic.php?hostname=test.burry.ca&myip=10.20.30.40&wildcard=ON'
|
#'https://api.cp.easydns.com/dyn/generic.php?hostname=test.burry.ca&myip=10.20.30.40&wildcard=ON'
|
||||||
my $url;
|
my $url = "https://$config{$h}{'server'}$config{$h}{'script'}?hostname=$h&myip=";
|
||||||
$url = "https://$config{$h}{'server'}$config{$h}{'script'}?";
|
|
||||||
$url .= "hostname=$h";
|
|
||||||
$url .= "&myip=";
|
|
||||||
$url .= $ipv4 if $ipv4;
|
$url .= $ipv4 if $ipv4;
|
||||||
for my $ipv6a ($ipv6) {
|
$url .= "&myip=$_" for $ipv6;
|
||||||
$url .= "&myip=";
|
$url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'ON', 'OFF', 'OFF')
|
||||||
$url .= $ipv6a
|
if defined($config{$h}{'wildcard'});
|
||||||
}
|
$url .= "&mx=$config{$h}{'mx'}&backmx=" . ynu($config{$h}{'backupmx'}, 'YES', 'NO')
|
||||||
$url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'ON', 'OFF', 'OFF') if defined $config{$h}{'wildcard'};
|
if $config{$h}{'mx'};
|
||||||
if ($config{$h}{'mx'}) {
|
|
||||||
$url .= "&mx=$config{$h}{'mx'}";
|
|
||||||
$url .= "&backmx=" . ynu($config{$h}{'backupmx'}, 'YES', 'NO');
|
|
||||||
}
|
|
||||||
my $reply = geturl(
|
my $reply = geturl(
|
||||||
proxy => opt('proxy'),
|
proxy => opt('proxy'),
|
||||||
url => $url,
|
url => $url,
|
||||||
|
|
Loading…
Reference in a new issue