updated patches, hope they work
This commit is contained in:
parent
4d5092a9b9
commit
53486a21fa
4 changed files with 103 additions and 8 deletions
93
net-dns/ddclient/files/ddclient-3.8.0-everydns.patch
Normal file
93
net-dns/ddclient/files/ddclient-3.8.0-everydns.patch
Normal file
|
@ -0,0 +1,93 @@
|
|||
--- ddclient.orig 2011-05-12 09:48:40.000000000 +0000
|
||||
+++ ddclient 2011-05-12 09:54:27.000000000 +0000
|
||||
@@ -524,6 +524,16 @@
|
||||
$variables{'service-common-defaults'},
|
||||
),
|
||||
},
|
||||
+ 'everydns' => {
|
||||
+ 'updateable' => undef,
|
||||
+ 'update' => \&nic_everydns_update,
|
||||
+ 'examples' => \&nic_everydns_examples,
|
||||
+ 'variables' => merge(
|
||||
+ { 'server' => setv(T_FQDNP, 1, 0, 1, 'dyn.everydns.net', undef) },
|
||||
+ { 'min-interval' => setv(T_DELAY, 0, 0, 1, 0, interval('15m')) },
|
||||
+ $variables{'service-common-defaults'},
|
||||
+ ),
|
||||
+ },
|
||||
);
|
||||
$variables{'merged'} = merge($variables{'global-defaults'},
|
||||
$variables{'service-common-defaults'},
|
||||
@@ -3377,6 +3387,73 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+######################################################################
|
||||
+## nic_everydns_examples
|
||||
+######################################################################
|
||||
+sub nic_everydns_examples {
|
||||
+ return <<EoEXAMPLE;
|
||||
+o 'everydns'
|
||||
+
|
||||
+The 'everydns' protocol is the protocol used by the free dynamic
|
||||
+DNS service offered by EveryDNS at www.everydns.net. So far it actually ignores the
|
||||
+value of the domain, it just updates all domains associated with the account
|
||||
+that belongs to the given credentials
|
||||
+
|
||||
+Configuration variables applicable to the 'everydns' protocol are:
|
||||
+ protocol=everydns ##
|
||||
+ server=dyn.everydns.net ## defaults to members.dyndns.org
|
||||
+ login=service-login ## login name and password registered with the service
|
||||
+ password=service-password ##
|
||||
+ domain.name ## the domain registered with the service.
|
||||
+
|
||||
+Example ${program}.conf file entries:
|
||||
+ ## single host update
|
||||
+ protocol=everydns, \\
|
||||
+ login=my-everydns.net-login, \\
|
||||
+ password=my-everydns.net-password \\
|
||||
+ my-example-domain.com
|
||||
+
|
||||
+EoEXAMPLE
|
||||
+}
|
||||
+######################################################################
|
||||
+## nic_everydns_update
|
||||
+######################################################################
|
||||
+sub nic_everydns_update {
|
||||
+ debug("\nnic_everydns_update -------------------");
|
||||
+
|
||||
+ ## update each configured domain
|
||||
+ foreach my $h (@_) {
|
||||
+ my $ip = delete $config{$h}{'wantip'};
|
||||
+ info("setting IP address to %s for %s", $ip, $h);
|
||||
+ verbose("UPDATE:","updating %s", $h);
|
||||
+
|
||||
+ my $url;
|
||||
+ $url = "http://$config{$h}{'server'}/index.php";
|
||||
+ $url .= "?ver=0.1";
|
||||
+ $url .= "&ip=$ip" if $ip;
|
||||
+ # $url .= "&domain=$d" if $d;
|
||||
+
|
||||
+ my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'});
|
||||
+ if (!defined($reply) || !$reply) {
|
||||
+ failed("updating %s: Could not connect to %s.", $h, $config{$h}{'server'});
|
||||
+ last;
|
||||
+ }
|
||||
+ last if !header_ok($h, $reply);
|
||||
+
|
||||
+ my @reply = split /\n/, $reply;
|
||||
+ if (grep /^Exit Code: 0$/i, @reply) {
|
||||
+ $config{$h}{'ip'} = $ip;
|
||||
+ $config{$h}{'mtime'} = $now;
|
||||
+ $config{$h}{'status'} = 'good';
|
||||
+ success("updating %s: good: IP address set to %s", $h, $ip);
|
||||
+ } else {
|
||||
+ $config{$h}{'status'} = 'failed';
|
||||
+ warning("SENT: %s", $url) unless opt('verbose');
|
||||
+ warning("REPLIED: %s", $reply);
|
||||
+ failed("updating %s: Invalid reply.", $h);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
|
||||
######################################################################
|
||||
# vim: ai ts=4 sw=4 tw=78 :
|
|
@ -1,14 +1,15 @@
|
|||
--- ddclient.orig 2009-01-27 20:14:02.000000000 +0100
|
||||
+++ ddclient 2011-05-12 01:34:15.995845012 +0200
|
||||
@@ -2460,9 +2460,8 @@
|
||||
--- ddclient.orig 2009-01-27 19:14:02.000000000 +0000
|
||||
+++ ddclient 2011-05-12 09:48:01.000000000 +0000
|
||||
@@ -2460,9 +2460,9 @@
|
||||
info("setting IP address to %s for %s", $ip, $hosts);
|
||||
verbose("UPDATE:","updating %s", $hosts);
|
||||
|
||||
- my $url = "http://$config{$h}{'server'}/nic/update?system=";
|
||||
- $url .= 'noip';
|
||||
- $url .= "&hostname=$hosts";
|
||||
+ my $url = "http://$config{$h}{'server'}/nic/update?";
|
||||
+ $url .= "hostname=$hosts";
|
||||
+ my $url = "http://$config{$h}{'server'}/nic/update?"
|
||||
+ $url .= "hostname=";
|
||||
+ $url .= "$hosts";
|
||||
$url .= "&myip=";
|
||||
$url .= $ip if $ip;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue