From owner-freebsd-questions Thu Sep 26 07:20:13 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id HAA07653 for questions-outgoing; Thu, 26 Sep 1996 07:20:13 -0700 (PDT) Received: from mail.Clark.Net (mail.clark.net [168.143.0.10]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id HAA07623 for ; Thu, 26 Sep 1996 07:20:10 -0700 (PDT) Received: from clark.net (root@clark.net [168.143.0.7]) by mail.Clark.Net (8.7.3/8.6.5) with ESMTP id KAA14861; Thu, 26 Sep 1996 10:20:06 -0400 (EDT) Received: from clark.net (markus@localhost [127.0.0.1]) by clark.net (8.7.1/8.7.1) with ESMTP id KAA09920; Thu, 26 Sep 1996 10:20:04 -0400 (EDT) Message-Id: <199609261420.KAA09920@clark.net> To: hmmm cc: freebsd-questions Subject: Re: ppp al In-reply-to: Your message of "Tue, 24 Sep 1996 18:08:38 -0000." Date: Thu, 26 Sep 1996 10:20:02 -0400 From: Mark Plummer Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > 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