[Zope] problems with init-script
J C Lawrence
claw@kanga.nu
Sun, 16 Mar 2003 14:12:55 -0800
On Sat, 15 Mar 2003 21:55:39 +0100
johan30 <johan> wrote:
> Ok , I understand, but anyway, it will cause all the other processes
> not being launched, because zope makes the server hanging. Is every
> zope server on debian experiances this problem ?
I'm not.
I have minor problems with Zope 2.5 silently dieing (and sometimes
locking up), but I whacked that mole with:
#!/bin/sh
#set -x
if (wget http://localhost:9673/status_page --spider -t 1 -T 5 >& /dev/null)
then
# Zope is alive
if [ -f /var/lib/zope/zope-status.down ]
then
# echo Zope is up | mail webmaster
rm -f /var/lib/zope/zope-status.down
touch /var/lib//zope/zope-status.up
echo `date` Zope is up >> /var/log/zope/crash.log
fi
else
# Zope is dead
if [ -f /var/lib/zope/zope-status.up ]
then
echo Zope is down | mail webmaster
rm -f /var/lib/zope/zope-status.up
touch /var/lib/zope/zope-status.down
echo `date` Zope is down >> /var/log/zope/crash.log
cd /var/lib/zope
/etc/init.d/zope stop
#export DIRNAME="var/logsnap/`date +%Y-%m-%d-%H-%M-%S`"
#mkdir "$DIRNAME"
#tail Zap/logs/zdnetindia.com-access_log > "$DIRNAME/zap.log"
#tail var/Z2.log > "$DIRNAME/Z2.log"
#tail var/debug.log > "$DIRNAME/debug.log"
#tail -30 var/zope-events.log > "$DIRNAME/zope-events.log"
/etc/init.d/zope start
fi
fi
--
J C Lawrence
---------(*) Satan, oscillate my metallic sonatas.
claw@kanga.nu He lived as a devil, eh?
http://www.kanga.nu/~claw/ Evil is a name of a foeman, as I live.