From owner-freebsd-questions Fri Jun 9 01:29:50 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id BAA24342 for questions-outgoing; Fri, 9 Jun 1995 01:29:50 -0700 Received: from relay2.UU.NET (relay2.UU.NET [192.48.96.7]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id BAA24318 for ; Fri, 9 Jun 1995 01:29:42 -0700 Received: from asylum.asylum.org by relay2.UU.NET with ESMTP id QQytiv21768; Fri, 9 Jun 1995 04:29:35 -0400 Received: (from dlr@localhost) by asylum.asylum.org (8.6.10/8.6.9) id DAA11999; Fri, 9 Jun 1995 03:28:36 -0500 From: dlr Message-Id: <199506090828.DAA11999@asylum.asylum.org> Subject: Re: PPP redial To: vrozma01@barney.poly.edu (VyacheslavS. Rozman) Date: Fri, 9 Jun 1995 03:28:35 -0500 (CDT) Cc: questions@freebsd.org In-Reply-To: from "VyacheslavS. Rozman" at Jun 9, 95 01:45:58 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 909 Sender: questions-owner@freebsd.org Precedence: bulk > > 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