MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Automatic warning upon minivend failure, crontab, Internal Server Error



******    message to minivend-users from Ryan Hertz <rhertz@gyb.baits.com>     ******

Hey list,

	I'm playing with a shell script that will run in my minivend user's
crontab to check the status of the store:

lynx -source 10.10.30.76/cgi-bin/order > teststore.out
if cat teststore.out | grep "Internal Server Error" > /dev/null
then
        cat teststore.out | mail orders
        chmod -R 0755 /var/lib/httpd/mvend
        /var/lib/httpd/mvend/bin/restart
elif cat teststore.out | grep "MiniVend server not running" > /dev/null
then
        cat teststore.out | mail orders
        /var/lib/httpd/mvend/bin/restart
elif cat teststore.out | grep "We are sorry, but the cgi-bin server is
unavailable" > /dev/null
then
        cat teststore.out | mail orders
fi

	The URL of 10.10.30.76/cgi-bin/order will probably be different for you,
depending on your system, or where you run the script from.  As well, your
paths will be different.  More often than not, when I get a Server
Misconfiguration or Internal Server Error it is because I goofed up the
permissions on a database file!  So the script tries to remedy that.  I've
even considered having it copy the whole tree into a 'failedmvend'
directory and replace it with the most recent backup copy.  But, that might
be a bit drastic!
	This is just a test, (which works, BTW), but eventually my script is going
to call me on the phone.  Does anyone on the list have experience with
having a Linux/unix box placing calls to a cell phone or pager?

Thanks!

Ryan Hertz                                              tel  520-645-3812
Webmaster                                               tel  800-645-BAIT
Advertising Director                                    fax  520-645-2588
Gary Yamamoto Custom Baits, Inc.            http://www.yamamoto.baits.com
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: