#! /bin/sh
#
# zope          Start/Stop the Zope web-application server.
#
# chkconfig: 2345 72 72
# description: zope is a web server specifically for handling
#              HTTP requests to the Zope web-application service.
# processname: zserver
# pidfile: /var/run/zserver.pid

# Source function library.
. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
	start)
  		echo -n "Starting zserver daemon: "
  		cd /var/zope
  		daemon /var/zope/zserver.sh &> /dev/nul &
  		echo
  		touch /var/lock/subsys/zope
  		;;
	stop)
		echo -n "Stopping zserver daemon: "
		killproc zserver
		echo
		rm -f /var/lock/subsys/zope
		;;
	status)
		status zserver
		;;
	restart)
		$0 stop
		$0 start
		;;
	*)
		echo "Usage: zope {start|stop|status|restart}"
		exit 1
	esac

	exit 0
