tool for checking website
Derek Ragona
derek at computinginnovations.com
Thu Oct 5 07:45:49 PDT 2006
Typically I do:
====================================================
#!/bin/sh
WGET=/usr/local/bin/wget
DIFF=/usr/bin/diff
MAIL=/usr/bin/mail
CAT=/bin/cat
RM=/bin/rm
MAILFILE=/tmp/site_report
MY_URL=http://www.mydomain.com
MY_PAGE=index.html
MY_REF_PAGE=/usr/local/www/good/index.html
cd /tmp
$WGET $MY_URL/$MY_PAGE
$DIFF $MY_PAGE $MY_REF_PAGE
if [ "$?" -eq 1 ]
echo "Site is down" > $MAILFILE
echo " " >> $MAILFILE
echo "Bad page retrieved:" >> $MAILFILE
$CAT $MY_PAGE >> $MAILFILE
echo " " >> $MAILFILE
$MAIL -s "Website Problem Report" me at mydomain.com < $MAILFILE
fi
====================================================
This will verify the page is being served, and the content is correct.
-Derek
At 06:40 AM 10/5/2006, Martin Schweizer wrote:
>Hello
>
>I'm looking for port which checks if a website is online or not. My goal is
>regulary starts a script which do this for me. Any ideas?
>
>--
>
>Regards
>
>Martin
><info at pc-service.ch>
>
>PC-Service M. Schweizer GmbH; Bannholzstrasse 6; CH-8608 Bubikon
>Tel. +41 55 243 30 00; Fax: +41 55 243 33 22; http://www.pc-service.ch;
>public key : http://www.pc-service.ch/pgp/public_key.asc;
>fingerprint: EC21 CA4D 5C78 BC2D 73B7 10F9 C1AE 1691 D30F D239;
>
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.
More information about the freebsd-questions
mailing list