RE: Script help...............
Dunno why you are doing it this way so let me ask. Why are you not using the
scripts in /etc/ppp/ip-{up,down}?? The IP address of the connection is passed
to the scripts on login. So you are guaranteed to get a good IP. If this is
not useful for some reason contact me and I can get your script working.
On 26-Oct-98 Phillip Neumann wrote:
> Hi debian world...
>
>
>
>
> Im not know very much about scripts so i need some help with one..
>
> Here my situation:
>
> A script will be executed when i call to my linux box... here it is:
>
> /etc/init.d/xringd stop
> /root/IP_MAIL
> pon incomingcall <--------------------
> /etc/init.d/xringd start |
> |
> |
>
> This has the -detach option so i can kill it
and the script will
> continue...
>
>
>
> Now, i have problems with /root/IP_MAIL, becouse it try to send me my ip
> number before i can get one... this is how IP_mail looks:
>
> 1)DAY=$(date +%A)
> 2)NUMBER=$(date +%d)
> 3)TIME=$(date +%r)
> 4)MONTH=$(date +%m)
> 5)IP=$(/sbin/ifconfig | grep inet | awk '{print $2}' |awk -F: '{print $2}' |
> grep -v 127)
> 6)echo "Today, $DAY $NUMBER/$MONTH [$TIME] you have got an ip address:
> $IP" > /tmp/iptemporal.tmp
> 7)mail -s "Identidad: $IP" filsin@innocent.com < /tmp/iptemporal.tmp
>
>
> in filsin@innocent.com i get:
> Today, Monday 26/10 [07:45:12 PM] you have got an ip address:
>
>
> so how can i make IP_MAIL do 1,2,3,4 and 5 until $IP is not empty ?? (is $IP
> is not empty then go on and send the mail...)
>
>
>
> Thanks,
> Phillip Neumann
> filsin@bigfoot.com
>
>
> --
> Unsubscribe? mail -s unsubscribe debian-user-request@lists.debian.org <
> /dev/null
----------------------------------
E-Mail: Shaleh <shaleh@livenet.net>
Date: 26-Oct-98
Time: 23:21:09
This message was sent by XFMail
----------------------------------
Reply to: