(zope)
Personal tools
You are here: Home ZOPE Zope自動起動用シェルスクリプト
Navigation

今の天気
  6℃ 60% 1025hPa WNW 5m
福岡地方の今の天気
« November 2008 »
Su Mo Tu We Th Fr Sa
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
最近のログイン

Reiko
2008/11/18 13:15

seko
2008/11/17 21:05

Guest
2008/11/12 15:50

Papasan
2008/10/22 19:40

hage88
2008/10/19 17:39

Peter
2008/10/06 21:22

猫さん。
2008/10/06 04:19

 
Document Actions

Zope自動起動用シェルスクリプト

by Papasan last modified 2007-04-23 18:38

ダウンロード後に実行できるようにパーミッションを変更してください。

Click here to get the file

Size 1.1 kB - File type text/x-sh

File 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