At 02:39 AM 12/15/2002 +0800, you wrote:
<snip out (ir)relevant scripting :)>I had a problem where my pppoe connection was lost two or three times a day..Since I use it to host works stuff. I needed it to be able to reconnect itself.. so I wrote this script.. it needs a few perl modules installed.. but it works great.. Its rough, but it works.. It goes and checks if it can access both google and yahoo and if it can't get one.. (it doesn't need to be able to get both.) it will restart the connection and email you to tell you it did.. copy everything from the start to the end lines.. and put it in a file.. put it in /usr/bin or similiar.. and make it executable.. then put an entry in contab like this: -0,10,20,30,40,50 * * * * /usr/sbin/monitor_connection >/dev/null That will run the script every ten minutes., and fix the connection if it goes down.. I have another version that monitors a dialup connection on another box..
Thx Frank. If I need it I'll use it. :) You don't say which Perl libs though? Care to enlighten us?
-------------
FemmeFatale
Good Decisions You boss Made:
"We'll do as you suggest and go with Linux. I've always liked that
character from Peanuts."
- Source: Dilbert
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com