[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] MV goes down, because a robot have visited my site!
On Tue, 26 Oct 1999 08:38:35 -0700, Luke Lozier wrote:
>****** message to minivend-users from "Luke Lozier" <luke@booksellersolutions.com> ******
>
>Can anyone supply me with a watch script that will restart my minivend if it
>crashes? I am on an Apache server using Minivend 3.14-3. A script that
>would send an email when it crashes would also be sufficient.
>
>Thanks.
I use this script written and kindly made public by Ryan Hertz,
though with some things commented out:-
===============
lynx -source your_domain.net/cgi-bin/catalogue_name > teststore.out
if cat teststore.out | grep "Internal Server Error" > /dev/null
then
# cat teststore.out
# chmod -R 0755 /var/lib/httpd/mvend
/home/your_domain/mvend/bin/restart
elif cat teststore.out | grep "We're sorry, the MiniVend server is unavailable..." > /dev/null
then
# cat teststore.out
# chmod 775 /var/lib/httpd/cgi-bin/order
# chmod s+u /var/lib/httpd/cgi-bin/order
/home/your_domain/mvend/bin/restart
elif cat teststore.out | grep "We are sorry, but the cgi-bin server is unavailable" > /dev/null
then
cat teststore.out
fi
================
NB/ both lines starting 'elif' may wrap - the next line starts 'then'.
I find that root's cron daemon at my ISP will email me with any
failures.
Cheers
Lyn