Revert to previous functionality

This commit is contained in:
Ian Colwell 2019-02-20 12:53:56 -04:00
parent 02c983a991
commit c6a384b590

View file

@ -3600,14 +3600,14 @@ Configuration variables applicable to the 'namecheap' protocol are:
server=fqdn.of.service ## defaults to dynamicdns.park-your-domain.com server=fqdn.of.service ## defaults to dynamicdns.park-your-domain.com
login=service-login ## login name and password registered with the service login=service-login ## login name and password registered with the service
password=service-password ## password=service-password ##
hostname ## the hostname to update. fully.qualified.host ## the hostname to update.
Example ${program}.conf file entries: Example ${program}.conf file entries:
## single host update ## single host update
protocol=namecheap, \\ protocol=namecheap, \\
login=my-namecheap.com-login, \\ login=my-namecheap.com-login, \\
password=my-namecheap.com-password \\ password=my-namecheap.com-password \\
myhost myhost.namecheap.com
EoEXAMPLE EoEXAMPLE
} }
@ -3630,15 +3630,17 @@ sub nic_namecheap_update {
## update each configured host ## update each configured host
foreach my $h (@_) { foreach 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("setting IP address to %s for %s", $ip, $h);
verbose("UPDATE:","updating %s", $h); verbose("UPDATE:","updating %s", $h);
my $url; my $url;
$url = "https://$config{$h}{'server'}/update"; $url = "https://$config{$h}{'server'}/update";
my $domain = $config{$h}{'login'}; my $domain = $config{$h}{'login'};
$url .= "?host=$h"; my $host = $h;
$url .= "&domain=$domain"; $host =~ s/(.*)\.$domain(.*)/$1$2/;
$url .= "?host=$host";
$url .= "&domain=$domain";
$url .= "&password=$config{$h}{'password'}"; $url .= "&password=$config{$h}{'password'}";
$url .= "&ip="; $url .= "&ip=";
$url .= $ip if $ip; $url .= $ip if $ip;