From owner-freebsd-questions@FreeBSD.ORG Fri Feb 13 11:24:10 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9801016A4CF for ; Fri, 13 Feb 2004 11:24:10 -0800 (PST) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.202.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F89943D31 for ; Fri, 13 Feb 2004 11:24:10 -0800 (PST) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from be-well.no-ip.com ([66.30.196.44]) by comcast.net (sccrmhc13) with ESMTP id <2004021319240901600dg9p3e>; Fri, 13 Feb 2004 19:24:09 +0000 Received: by be-well.no-ip.com (Postfix, from userid 1147) id A6A2012; Fri, 13 Feb 2004 14:24:09 -0500 (EST) Sender: lowell@be-well.ilk.org To: Barbish3@adelphia.net References: From: Lowell Gilbert Date: 13 Feb 2004 14:24:09 -0500 In-Reply-To: Message-ID: <44vfmapyue.fsf@be-well.ilk.org> Lines: 27 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" cc: Ceri Davies cc: "freebsd-questions@FreeBSD. ORG" Subject: Re: Using dhclient to update zoneedit with my dynamic IP address X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2004 19:24:10 -0000 --=-=-= "JJB" 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" --=-=-=--