[ale] gateway external ip
David S. Jackson
dsj at sylvester.dsj.net
Fri Aug 8 10:37:25 EDT 2003
On Thu, Aug 07, 2003 at 09:26:30AM -0400 Robert Coggins <ALE at CogginsNet.com> wrote:
> Actually I have found a solution. I wrote an ugly script to get my ip
> address and email it to myself. Right now I have it checking everyhour
> using cron and emailing me the ip. Today during lunch break I am going to
> make it where it will not email unless the ip has changed from the last time
> it changed. If anyone is interested I will post it. However, I stress this
> is something really ugly. I just through a bunch of stuff into a shell
> script. But hey! It works!
So what did you wind up going with?
It might be harder to find something as simple as :
MYIP="whatever your current IP is" # remove after 1st run
w3m http://www.checkip.net -dump | grep "Current IP Address" | sed 's/^.*: //g' | read MYIP_NOW && if [ "$MYIP_NOW" != "$MYIP" ]; then mail -s "IP Change" < `w3m http://www.checkip.net -dump -T text/html ` you at locahost ; fi
MYIP=MYIP_NOW
Lynx has similar options I'm sure. I just prefer w3m. You will
have to fiddle with your w3m/lynx switches, since the page gives
w3m an "error 63", whatever that is.
--
David S. Jackson dsj at dsj.net
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
I have a map of the United States. It's actual size.
I spent last summer folding it. People ask me where
I live, and I say, "E6". -- Steven Wright
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list