OK, this ain't what it wuz ... After a few days, I realized that sending five pings and checking for 100% failure was sufficient to detect a disconnect, and there is no need to kill and restart httpd, so this is a lot simpler than described in the DayBooks entry. :-)

-=DAH=- 22-Mar-96


#!/bin/sh
#
logfile=/var/httpd/logs/error_log
# node to ping = zork.tiac.net
node=199.0.65.2
declare -i x=0
while sleep 60s; do
    if ping -c 5 $node | grep 100% >/dev/null; then
	let x=$x+1
	ppp-down ; ppp-up
	sleep 60s
	if ping -c 5 $node | grep 100% >/dev/null; then
	    echo [`clock`] "webchk: It's dead, Jim!" - $x >>$logfile
	else
	    echo [`clock`] "webchk: We're back in business!" >>$logfile
	fi
    else
	let x=0
    fi
done