Date: Thu, 6 Apr 1995 18:32:22 -0700 From: dlr@netcom.com (dlr) To: FreeBSD-questions@FreeBSD.org Subject: PPP test script Message-ID: <199504070132.SAA19689@netcom.netcom.com>
next in thread | raw e-mail | index | archive | help
Here is a PPP script that will test to see if my ppp connection is up and if it isn't will kill pppd and restart ppp. It works for me under freebsd 2.0. I thought someone else may be able to use it. Sameer@c2.org helped me with it. if [ `ping -c 5 decker | grep "packet loss" | awk '{ print $4 }'` -gt 0 ] then echo "PPP up" else ps ax |grep pppd |grep -v grep pid=`ps ax |grep pppd |grep -v grep|awk '{print $1;}'` if [ "X${pid}" != "X" ] ; then echo 'killing pppd, PID=' ${pid} kill ${pid} sleep 15 fi # Bring up ppp /etc/ppplogin fi dave
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504070132.SAA19689>