Date: Thu, 26 Sep 1996 10:20:02 -0400 From: Mark Plummer <markus@clark.net> To: hmmm <hmmm@alaska.net> Cc: freebsd-questions <questions@FreeBSD.ORG> Subject: Re: ppp al Message-ID: <199609261420.KAA09920@clark.net> In-Reply-To: Your message of "Tue, 24 Sep 1996 18:08:38 -0000." <Pine.BSF.3.95.960924180651.293D-100000@hmmm.alaska.net>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Tue, 24 Sep 1996, Doug White wrote: > > what is the minimun additional configuration required to keep iijppp > "alive" to an ISP? has something to do with "afilter", but i guess the > full explanation is in japanese, cuz it ain't in the standard docs. > > thanks. dunno, but what follows is a script to be run from cron which will restart iijppp if it decects it to be down. markus - -- Mark Plummer, markus@clark.net, +1 410 796 1272 #=======cut here #!/bin/sh PATH=/sbin:/usr/sbin:/bin:/usr/bin ipaddr="$1" # which ip address to check for basic connectivity ppptag="$2" # which tag in ppp.conf to use to redial pppline=`ps -axu | grep "[p][p][p][) ]"` if [ ! -z "$pppline" ] ; then if ping -c 10 $ipaddr 2> /dev/null | grep -q "100% packet loss" ; then ppppid=`echo $pppline | awk '{print $2}'` kill $ppppid sleep 3 ppp $ppptag > /dev/null 2>&1 & fi else ppp $ppptag > /dev/null 2>&1 & fi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609261420.KAA09920>