MiniVend Akopia Services

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

Re: crontab entry to check for dead Minivend server



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

I've got a catalog checker that digs a little deeper - to perhaps catch
problems other than the server not running... for example, when I screw up
the permissions on a db file:

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
        chmod 775 /var/lib/httpd/cgi-bin/order
        chmod s+u /var/lib/httpd/cgi-bin/order
        /var/lib/httpd/mvend/bin/restart
elif cat teststore.out | grep "We are sorry, but the cgi-bin server is
unavailab
le" > /dev/null
then
        cat teststore.out | mail orders
fi



At 02:59 AM 3/26/99 , Frank Miedreich wrote:
>******    message to minivend-users from Frank Miedreich
<miedreich@acm.org>     ******
>
>>******    message to minivend-users from "Thompson-Jordan"
>><Thompson-Jordan@mindspring.com>     ******
>>
>>While reading the expireall -r messages, I was was thinking of other
>>things I would like in crontab and wondering if anyone has done anything
>>like:
>>
>>- script that checks if the Minivend server is running and runs restart it
>>if it isn't
>>
>>- script that would safely move the log files to another directory, maybe
>>adding the date to the name, effectively clearing them and making the old
>>logs available to parse offline.
>>
>>
>>Christopher Thompson
>>
>
>the first script you suggest is in mvend/bin/checkstat.sh
>
>to rotate the log files I use:
>
>#!/bin/sh
>
># rotates log files
># This can be run as a cron script
>
>DATE=`date +%h-%y`
>CATDIR='/home/kmied/catalogs'
>
># Add here any catalogs.
>CATALOGS='cat1 cat2 cat3'
>
># Add here any logfiles.
>LOGS='error.log'
>
>
>(cd $CATDIR;
>
> for c in $CATALOGS; do
>   cd $c;
>   for i in $LOGS; do
>     if [ -f $i ]; then
>       mv $i $i.$DATE
>     fi
>   done
>   cd ..;
> done)
>
>Cheers, Frank
>
>--
>Frank Miedreich
>Max-Planck-Institut fuer psychologische Forschung
>
>
>-
>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
> 

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: