Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Oct 2006 09:44:19 -0500
From:      Derek Ragona <derek@computinginnovations.com>
To:        Martin Schweizer <info@pc-service.ch>, freebsd-questions@freebsd.org
Subject:   Re: tool for checking website
Message-ID:  <6.0.0.22.2.20061005090621.02166108@mail.computinginnovations.com>
In-Reply-To: <20061005114043.GA49078@saturn.pcs.ms>
References:  <20061005114043.GA49078@saturn.pcs.ms>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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@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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6.0.0.22.2.20061005090621.02166108>