[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Look and See script



On Fri, 2002-04-12 at 11:12, Chuck Peters wrote:
> 
> I did the following running from cron every 5 minutes.  Note cron output
> was sent to /dev/null.  It was a test box.
> 
> #!/bin/sh
> # ZOPE query
> ZOPEQUERY=`ps auwx |grep z2.py | wc -l`
> 
>     if test $ZOPEQUERY -lt 2; then
>         cd /usr/local/dc/Zope
>         ./start &
>         echo "`date`: No response from Zope Service" >> /home/zope/zoperestartlog
>     fi
> 
> 


That may missfire, try this:
#!/bin/sh
# ZOPE query
ZOPEQUERY=`ps auwx |grep [z]2.py | wc -l`

    if test $ZOPEQUERY -lt 2; then
        cd /usr/local/dc/Zope
        ./start &
        echo "`date`: No response from Zope Service" >> /home/zope/zoperestartlog
    fi

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: