From owner-freebsd-hackers Thu Jun 13 3:54: 9 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from bast.unixathome.org (bast.unixathome.org [216.187.105.150]) by hub.freebsd.org (Postfix) with ESMTP id F361337B421 for ; Thu, 13 Jun 2002 03:54:03 -0700 (PDT) Received: from wocker (wocker.unixathome.org [192.168.0.99]) by bast.unixathome.org (Postfix) with ESMTP id 490303F28 for ; Thu, 13 Jun 2002 06:55:46 -0400 (EDT) From: "Dan Langille" Organization: DVL Software Limited To: freebsd-hackers@FreeBSD.ORG Date: Thu, 13 Jun 2002 06:53:54 -0400 MIME-Version: 1.0 Subject: Re: how to automagically restart net/pptpclient? Reply-To: dan@langille.org References: <20020528183156.6C6113F35@bast.unixathome.org> In-reply-to: <20020528210531.X299-100000@leelou.in.tern> X-mailer: Pegasus Mail for Windows (v4.01) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Message-Id: <20020613105546.490303F28@bast.unixathome.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 28 May 2002 at 21:08, Lukas Ertl wrote: > On Tue, 28 May 2002, Dan Langille wrote: > > > That looks good. I've tried it, but have been unable to connect to the > > office, which is running an MS PPtP server. I know the *can* work > > because pptp-client can connect. FWIW, here's what I'm running from cron every five minutes: #!/bin/sh ping -n -c 1 -t 2 10.0.1.249 2>&1 > /dev/null if [ $? -ne 0 ] then NETMASK=`ifconfig tun0 | grep -c netmask` if [ $NETMASK -eq 0 ] then echo "TUN0 is not healthy. starting VPN again." /usr/local/etc/rc.d/pptp.sh start else # echo "TUN0 looks healthy" fi else # echo "link is OK" fi -- Dan Langille To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message