On Mon, 2003-07-07 at 10:22, [EMAIL PROTECTED] wrote:
> Anyone know of a way to have a perl script, or system script occasionally
> check/ping a url to see if it is working?
>
> (the rest of the script will have a email sent if the url doesn't work).
>
Here's an ipcop script that checks the connection and resets it if it's
down. You could easily alter this to achieve your desired end:
#!/bin/sh
#Check the connection on an ipcop firewall and reset if it's down
ping -c1 `netstat -rn | grep ^0.0.0.0 | awk '{print $2}'`
if [ "$?" != "0" ] ; then
/etc/rc.d/netaddress.down
/etc/rc.d/netaddress.up
fi
--
Neil Jolly
(with Yoda-like voice)
"Confrontation leads to anger... Anger leads to fear... Fear leads
to using Windows NT in mission-critical combat systems... And this is
how the ancients fell...