Hi people,
I want my gentoo machine to check every 5 minutes the connection status.
Therefor I wrote a shell script:

-----

#!/bin/bash
#set -x

dnsbroken=`ping -c1nqW5 -s8 mydomain.com 2>&1 | grep -e "unknown" -e
"denied" -e "permited"`

if [ -n "$dnsbroken" ]
then

# reconnect the connection
    /etc/init.d/net.ppp0 restart

fi

exit 0

----

to check if the connection exists, and if not restarts the init.ppp0
script.
This script I made it root:root and permission: 500

on crontab:
0-59/5 * * * * /usr/sbin/bash_ppp



The problem:
when the connection is down, even after 5 minutes or 10, the script
isn't being executed, when I execute it by hand it works!


Any ideas?!


Tamer

Reply via email to