Well, here is a little script I use for adsl monitoring.

#!/bin/bash

ping -c2 192.115.133.185

if [ "$?" != "0" ]; then
    poff -a
    killall pppd
    killall pptp
    rm -rf /var/run/pptp
    rm -rf /var/lock/LCK..pts_0
    sleep 5
    /usr/sbin/pptp 10.0.0.138 --quirks BEZEQ_ISRAEL user [EMAIL PROTECTED]
persist defaultroute noauth
fi

I execute it via crontab every 15 min and it works without problems. Try it
if you want.

Oleg.

----- Original Message ----- 
From: "Noam Rathaus" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 16, 2003 11:43 AM
Subject: ADSL Monitoring Crontab


Hi,

I have implemented the following Crontab record to monitor my ADSL, and
bring it up when it comes done:
if ! ping -c 1 -n 192.114.47.250 > /dev/null ; then killall -KILL pptp ;
logger ADSL connection stopped ; /usr/sbin/adsl-up ; logger ADSL connection
started; fi

It doesn't work well :(, I get a lot of "/bin/sh ping..." entries in the
process list, consuming a lot of memory.

Does anyone have a better solution?

Thanks
Noam Rathaus
CTO
Beyond Security Ltd.
http://www.securiteam.com


======================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]





=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to