[Zope] Zope Init script?

Pavlos Christoforou pavlos@gaaros.msrc.sunysb.edu
Mon, 15 Nov 1999 17:20:46 -0500 (EST)


On Mon, 15 Nov 1999, Jochen Haeberle wrote:

> Anyone else out there who could help us???
> 
> Jochen

This is the one I use which was posted on the list some time ago, by ...
oh boy I forgot.

#!/bin/sh
#
# description: Runs Zope
# chkconfig: 345 80 45
# Source function library.
. /etc/rc.d/init.d/functions


# See how we were called.
case "$1" in
  start)
        echo -n "Starting Zope: "
        touch /var/lock/subsys/zope
        daemon /usr/local/bin/start_zope
        echo

        ;;
  stop)
        echo -n "Shutting down Zope: "
        /usr/local/Zope/stop
        rm -f /var/lock/subsys/zope
        echo
        ;;
  status)
        status zope
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  *)
        echo "Usage: zope {start|stop|status|restart}"
        exit 1
esac

exit 0


and start_zope is basically:
#! /bin/sh
PYTHONHOME=/usr/local/Zopec
export PYTHONHOME
exec /usr/local/bin/python \
  /usr/local/Zope/z2.py \
  -a <ip add> \
  -d <ip add> \
  -u nobody \
  -w 8080 \
  -f 8021 \
  -m 8033 \
  -l /usr/local/Zope/var/ZServer.log 

Pavlos