Skip site navigation (1)Skip section navigation (2)
Date:      13 Feb 2004 14:24:09 -0500
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        Barbish3@adelphia.net
Cc:        "freebsd-questions@FreeBSD. ORG" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Using dhclient to update zoneedit with my dynamic IP address
Message-ID:  <44vfmapyue.fsf@be-well.ilk.org>
In-Reply-To: <MIEPLLIBMLEEABPDBIEGOEPPFKAA.Barbish3@adelphia.net>
References:  <MIEPLLIBMLEEABPDBIEGOEPPFKAA.Barbish3@adelphia.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=

"JJB" <Barbish3@adelphia.net> writes:

> Thanks for the pointer to the 'man dhclient-script'.
> 
> I read through it 3-5 times and the best I can make out of what
> it says is, that if I create an file like this
> /etc/dhclient-exit-hooks.sh with this content
> 
> #! /bin/sh
> wget -O - --http-user=username --http-passwd=password,
> 'http://dynamic.zoneedit.com/auth/dynamic.html?host=www.mydomain.com
> '
> 
> Then every time dhclient runs (IE: at bootup and lease expire)
> the dhclient-exit-hooks.sh gets run.

Yes.

As another example, my own script for a similar purpose:

--=-=-=
Content-Disposition: attachment; filename=dhclient-exit-hooks
Content-Description: dhclient-exit-hooks

#!/bin/sh

updater_prog = /usr/local/bin/noip2 
if [ x$reason = xREBOOT ]   || 	\
   [ x$old_ip_address = x ] || 	\
   [ x$old_ip_address != x$new_ip_address ]; then
    if [ -x $updater_prog ]; then 
	${updater_prog} -i "$new_ip_address"
    fi
fi

--=-=-=



-- 
Lowell Gilbert, embedded/networking software engineer, Boston area: 
		resume/CV at http://be-well.ilk.org:8088/~lowell/resume/
		username/password "public"

--=-=-=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44vfmapyue.fsf>