Thanks Brian. I'll keep this for reference. BTW, the script /etc/ppp/ip-up exports the dynamic address as PPP_LOCAL. Should I not be able to use that in my script? export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
Thanks again, Russ On 30 Dec 2002, Brian P. Flaherty wrote: > Russ Cook <[EMAIL PROTECTED]> writes: > > > I named the script mail_ppp. It's purpose is to email > > my dynamic address to a specific email address after > > dial up, so I can access my network from remote locations. > > I did this with the following script. The IP address part may be > ugly, but it works. The script sleeps 5 minutes in order to let > fetchmail get mail and allow my use of the SMTP server. This has been > working for me for a while. > > > b:/etc/ppp/ip-up.d$ cat 50mail_ip > #!/bin/sh > # send ip when DSL comes up > > PATH=/bin:/usr/bin:/sbin:/usr/sbin > > IPADDR=`ifconfig ppp0 | awk '{print $2}' | grep addr | awk -F: '{print $2}'` > > sleep 5m > echo $IPADDR | mail [EMAIL PROTECTED] > > > This script is in the ip-up.d directory and has the same permissions > and ownership as the other files there. I hope this helps. > > Brian > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > > -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]