#!/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. # probe: true # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. if is_yes "${NETWORKING}"; then if [ ! -f /var/lock/subsys/network ]; then msg_network_down Zope exit 1 fi else exit 0 fi CLIENT_HOME=/var/lib/zope RETVAL=0 # See how we were called. case "$1" in start) if [ -f /var/lock/subsys/zope ]; then msg_already_running Zope else msg_starting Zope busy daemon zope-zserver RETVAL=$?; sleep 5 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/zope fi ;; stop) if [ -f /var/lock/subsys/zope ]; then msg_stopping Zope kill `cat ${CLIENT_HOME}/Z2.pid` sleep 1 deltext ok rm -f /var/lock/subsys/zope >/dev/null 2>&1 else msg_not_running Zope exit 1 fi ;; status) if ps -p `cat ${CLIENT_HOME}/Z2.pid | awk '{print $2}'` >/dev/null; then RETVAL=$? nls "Zope (pid %s) is running" "`cat ${CLIENT_HOME}/Z2.pid`" else msg_not_running Zope RETVAL=1 fi ;; restart|reload) $0 stop $0 start ;; *) msg_usage "$0 {start|stop|restart|reload|status}" exit 1 ;; esac exit $RETVAL