sure,

This written at the top of the script.. sorry, should have been more
precise...

use LWP::UserAgent;
use HTTP::Request::Common qw(GET);
use MIME::Lite;


so just go to seach.cpan.org
and use the search facility to find:

LWP::UserAgent
MIME::Lite
HTTP::Request

the download links will be on the search results..

Though there are probably mandrake RPM's for this on the disks or
contribs...

MIME::Lite is for sending the email and
LWP::UserAgent and HTTP::Request are for getting the google/yahoo request...

Thats all you need..

I use variations of this script for monitoring our work servers and telling
me when they are down as well.
very handy..

rgds

Frank


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of FemmeFatale
Sent: Sunday, 15 December 2002 5:31 AM
To: [EMAIL PROTECTED]
Subject: RE: [newbie] Linux installation & Router Advice (a freebie
script I wrote for connection monitoring.)


At 02:39 AM 12/15/2002 +0800, you wrote:
>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..

<snip out (ir)relevant scripting :)>

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

Reply via email to