Re: Can I use /etc/dhclient-exit-hooks to run an IP updater?



On 2006-09-17, Ohmster <nowayin@xxxxxxxx> wrote:
They are one-liners
---------------------------------------------------------------------
wget -O - --http-user=username --http-passwd=password
'http://dynamic.zoneedit.com/auth/dynamic.html?host=www.mydomain1.com'

wget -O - --http-user=username --http-passwd=password
'http://dynamic.zoneedit.com/auth/dynamic.html?host=www.mydomain2.com'

wget -O - --http-user=username --http-passwd=password
'http://dynamic.zoneedit.com/auth/dynamic.html?host=www.mydomain3.com'
---------------------------------------------------------------------

Should I put these wget commands in a text file and make it executable?
Is there anything else that needs to go into this executable text file
like #!/bin/bash or anything like that or no, just put the commands, one
per line, in a regular executable text file?

Here is the scrip what I use:

#!/bin/sh

case $reason in
BOUND|RENEW|REBIND|REBOOT)
if [ "$interface" = "eth0.1" ]
then
/usr/local/sbin/everydns /usr/local/etc/everydns.conf lifeintegrity.com=$new_ip_address
fi
;;
esac

if you only have one interface configured via dhcp then you do not need the if
statement, and you would want to replace the everydns line with you wgets.


/Allan
.