On Fri, 27 Jun 2003, Steve Cox - dig wrote:

> This might be a little bit newbie, not sure. I want to keep an eye on my
> ip address off my adsl line, as it changes I would like a scirpt to run,
> basically uploading to a hosted out website. Currently I use a cron job
> every 15 mins that checks if the current ip is the same as the last in
> /var/log/syslog, if not then and only then upload it. I do not run any
> mail services, I do however run apache live for webpages only. It is on
> a text only machine, Mandrake9.1, P1 100mhz, that doubles as my gateway
> for small lan at home. If anyone has pointers, please share.

If your ADSL modem is hooked to eth0, and you get your IP address via 
DHCP, then you can place a script in the /etc/dhcpc/ directory with the 
name "dhcpcd-eth0.exe" (don't forget to make it executable!) and it will 
run every time the dhcpcd daemon determines that your IP address on that 
interface has changed.

I use it to run a lynx command that hits a page on the ZoneEdit.com site,
which determines the IP address that the hit came from, and updates my DNS
entries there accordingly. The script then goes on to send me an e-mail
notification of the change, including the output of "ifconfig eth0".

-- 
Bill Mullen   [EMAIL PROTECTED]   MA, USA   RLU #270075   MDK 8.1 & 9.0
The engineer is neither optimist nor pessimist. He sees the proverbial
half-full/empty glass and says, "The glass is twice as big as there is
any need for it to be."

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to