Re: [Ddclient-support] Avoiding update when the IP has not changed
Brought to you by:
supersandro2000,
wimpunk
From: wimpunk <wi...@us...> - 2014-05-07 06:14:10
|
Hi, It should check its IP against the cached version and only commit the detected IP if it differs from the cached version or if the latest update was long ago (based on max-interval). It looks like you either have a cache or a configuration problem. Regards, wimpunk. On 05/06/14 22:48, Roberto Pavani wrote: > Hi all, > > I have seen on the syslog that ddclient write a warning > > WARNING: updating .... nochg: No update required; unnecessary attempts > to change to the current address are considered abusive > > So checking the code (from my little understanding) it seems that the > update procedure will happen also when the IP > hasn't changed. > I have then added a little piece of code (just for the no-ip section > but similar can be done on dyndns section) > This little piece of code check the ip for the host to be updated > against the one obtained by Google dns server. > If the wanted ip address is same of the one obtained from google DNS > server 8.8.8.8 then a "SUCCESS" message > will be printed and remain part of the code will be skipped for that > host. > Here my diff of original client and my mod > > I don't know if this feature is already present on the code and was > just me that didn't realyze that. > > If not, i hope someone will do similar change on the mainained > code adding same also on dyndns part. > > Cheers > > Roberto > > ========================================= > diff /usr/sbin/ddclient.orig /usr/sbin/ddclient > 2465a2466,2473 > > my $host_ip = `host $h 8.8.8.8|grep $h|sed 's/.*has address //'`; > > > > if ( $ip == $host_ip ) > > { > > success("Host already updated %s: IP address is %s was %s", $h, > $ip, $host_ip); > > } > > else > > { > 2537a2546 > > } > > > ------------------------------------------------------------------------------ > Is your legacy SCM system holding you back? Join Perforce May 7 to find out: > • 3 signs your SCM is hindering your productivity > • Requirements for releasing software faster > • Expert tips and advice for migrating your SCM now > http://p.sf.net/sfu/perforce > _______________________________________________ > Ddclient-support mailing list > Ddc...@li... > https://lists.sourceforge.net/lists/listinfo/ddclient-support > |