Zope自動起動用シェルスクリプト
ダウンロード後に実行できるようにパーミッションを変更してください。
Size 1.1 kB - File type text/x-shFile contents
#!/bin/sh
#
# zope Start/Stop the Zope web-application server.
#
# chkconfig: 2345 73 73
# description: zope is a web server specifically for handling \
# HTTP requests to the Zope web-application service.
#
# Source function library.
. /etc/rc.d/init.d/functions
INSTANCE_HOME=/var/lib/zope
INSTANCE_NAME=`basename ${INSTANCE_HOME}`
RETVAL=0
[ -f ${INSTANCE_HOME}/bin/zopectl ] || exit 0
case "$1" in
start)
echo -n "Starting zope: "
umask 077
${INSTANCE_HOME}/bin/zopectl start > /dev/null 2>&1
RETVAL=$?
[ $RETVAL -eq 0 ] && success || failure
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/${INSTANCE_NAME}
;;
stop)
echo -n "Shutdown zope: "
${INSTANCE_HOME}/bin/zopectl stop > /dev/null 2>&1
RETVAL=$?
[ $RETVAL -eq 0 ] && success || failure
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/${INSTANCE_NAME}
;;
restart|reload)
$0 stop
$0 start
RETVAL=$?
;;
condrestart)
[ -f /var/lock/subsys/${INSTANCE_NAME} ] && $0 restart || RETVAL=0
;;
status)
${INSTANCE_HOME}/bin/zopectl status
[ $RETVAL -ne 0 ] && RETVAL=$?
;;
*)
echo "Usage: zope {start|stop|restart|condrestart|status}"
exit 1
esac
exit $RETVAL
Click here to get the file