Re: Help me, please.

2005-07-07 Thread Rajkumar Andrews
for starters the following (untested) script -- #!/bin/sh ISPA="192.168.1.1" var1=`ping -c 3 $ISPA | grep "3 packets received"` if [ $var1 not equal to 0]; then echo "connection down" # code to change gateway inserted here # either start a second script or function to check if th

Re: Help me, please.

2005-07-07 Thread Siju George
On 7/6/05, Rajkumar Andrews <[EMAIL PROTECTED]> wrote: > Further, a shell script could be put as a cron job to ensure that if > the default gateway goes down (ISP-A is out) then the default gateway > ought to be changed to the next (ISP-B) and a monitoring starts to > ensure that ISP-A comes back a