zope
per Victor Carceler
—
darrera modificació
2020-03-25T15:35:27+01:00
Script de control de Zope adaptado a partir del que se incluye en zope-2.7.4-2mdk
#!/bin/sh
# RedHat startup script for a Zope instance using zopectl
#
# chkconfig: 2345 80 20
# description: Zope, the web application server
# Source function library.
. /etc/rc.d/init.d/functions
zopectl="/opt/zope_misitio/bin/zopectl"
name="zope"
sleep_time=1
[ -f $zopectl ] || exit 1
RETVAL=0
start() {
gprintf "Starting %s: " "$name"
"$zopectl" start > /dev/null
RETVAL=$?
# wait for zope startup
sleep $sleep_time
# and check if deamon is running
STATUS=`$zopectl status | grep 'not running'`
[ "$STATUS" != "" ] && failure "startup" || success "startup"
echo
return $RETVAL
}
stop() {
gprintf "Stopping %s: " "$name"
"$zopectl" stop > /dev/null
RETVAL=$?
STATUS=`$zopectl status | grep 'not running'`
[ "$STATUS" != "" ] && success "stop" || failure "stop"
echo
return $RETVAL
}
status() {
"$zopectl" status
RETVAL=$?
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status
;;
*)
gprintf "Usage: %s {start|stop|restart|status}\n" "$0"
exit 1
esac
exit $REVAL