Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Jun 1995 03:28:35 -0500 (CDT)
From:      dlr <dlr@asylum.org>
To:        vrozma01@barney.poly.edu (VyacheslavS. Rozman)
Cc:        questions@freebsd.org
Subject:   Re: PPP redial
Message-ID:  <199506090828.DAA11999@asylum.asylum.org>
In-Reply-To: <Pine.SOL.3.91.950609014303.18827A-100000@barney> from "VyacheslavS. Rozman" at Jun 9, 95 01:45:58 am

next in thread | previous in thread | raw e-mail | index | archive | help
> 
>  I am using PPP account, and sometimes it is very difficult to connect to 
>  the server because the line is busy.  I have to redial many times.  I would 
>  greately appreciate it if someone could help me to establish an 
>  automatic redial feature.

Here is a script I use. I have changed the domain name for the ping, and 
my /etc/ppplogin is a script that uses chat to call the provider and 
establish connection. Run it from cron every so often.

The following is very simple but seems to be working fine.


*****************************************************************

#!/bin/sh
PATH=/etc:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin 
LOGFILE=/var/log/ppp.log
export PATH LOGFILE
 
if [ `ping -c 5 Domain | grep "packet loss" | awk '{ print $4 }'` -eq 0 ];then
        kill `cat /var/run/ppp0.pid`
        sleep 15
        /etc/ppplogin
        echo "pppd restarted" >> $LOGFILE
fi
 
 
exit




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199506090828.DAA11999>