[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Dynamic IP Script??



On Tue, 4 Nov 1997, Ian Keith Setford wrote:

> 
> Hi-
> I am interested in a script of some sort that would email me (at a given
> address) whenever my ISDN connection is disconnected by my provider and
> my IP is reassigned upon a new dial-up connection. I am(of course) trying

I do something similar - my /etc/ppp/ip-up contains (after the export
PATH statement that's there by default):

mail -s "$4" martind@math.jhu.edu <<EOD
The new ip address is in the subject.
EOD
runq

The "runq" is in case my link has been down for a while and there's
outgoing mail that should be sent.  The first three lines do what you
want.  I suppose I could be more elaborate, by then having procmail on the
account that receives the new ip-address do something special, like put it
in a file or modify a web page on the machine that's always up to point to
the webserver on my machine, but this is really enough for what I'm doing.

Incidentally, you should really consult the dynamic-IP-hacks mini-HOWTO;
it contains this trick and much more.



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: