On Fri, 28 Aug 1998, Stefan Frank wrote:
> Hi,
>
> i'm looking for a way to check within a shell script wheter a PPP connection
> is already up or not. To check for a /var/run/ppp0.pid file did not help, as
> this file is already created when the modem is still dialing my ISP's
> number.
>
I create a file using the /etc/ppp/ip-up script (or, lately, a script in
/etc/ppp/ip-up.d/ directory - just installed debian). This script is
called _after_ the link comes up. I also put my IP number there, so I can
get it from anywhere I want. This file is then used in a script that i run
from cron to fetch mail every x minutes, but _only_ when the link is up.
If someone want's a file from me, I just tell him to
ftp `cat /tmp/IP`/pub/ :-]
Oh, I also delete the file when the link goes down.(/etc/ppp/ip-down)
If you want more information just send me a message.
bye,
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|Borut Mrak a.k.a. PyO-GEniC | [EMAIL PROTECTED] | phone: +386|
|a wannabe bofh, | [EMAIL PROTECTED] | (0)65 51248|
|irc operator at irc.rulz.org | [EMAIL PROTECTED] | (0)61 267876|
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to [EMAIL PROTECTED]