I've been successfully using the script pasted at the bottom of this post, having assembled it from other posts (mostly http://www.linksysinfo.org/forums/showthread.php?t=58340). As you'll see, Tomato basically tries as many as 4 ping attempts to the OpenDNS primary server, and if it gets no response, it reboots my DSL modem, then reboots itself. Otherwise, if there is a successful ping response, it just logs the running of the script and then quits. What I'd really like to do is be able to add one more loop to test another IP with ping, just to ensure that the router doesn't reboot if the one OpenDNS server goes down. I think I need a more or less identical while/do loop to ping another outside IP only if there are 4 unsuccessful pings to the OpenDNS IP. The trouble is that I'm lousy at scripting (I'm much better at copying other people's work!) and have failed at my attempts. So I'd really appreciate any help! Here's the script I'm currently using without trouble: Code: cat <<END > /tmp/keepalive.sh #!/bin/sh ping_attempt=0 while ( ( /bin/ping -c 1 188.8.131.52 | /bin/grep -q '100% packet loss' ) && \ [ \$ping_attempt -lt '3' ] ) do ping_attempt=\`expr \$ping_attempt + 1\` /bin/sleep 1 done if [ \$ping_attempt = 3 ] ; then wget -q [url]http://user:email@example.com/rebootinfo.cgi[/url] sleep 45 /sbin/reboot fi logger "The keep alive script finished" END chmod 755 /tmp/keepalive.sh cru a KeepAliveScript "0,15,30,45 * * * * /tmp/keepalive.sh >/dev/null 2>&1"