]> git.pld-linux.org Git - packages/Zope.git/blame_incremental - Zope.init
- updated
[packages/Zope.git] / Zope.init
... / ...
CommitLineData
1#!/bin/sh
2#
3# zope Start/Stop the Zope web-application server.
4#
5# chkconfig: 2345 72 72
6# description: zope is a web server specifically for handling \
7# HTTP requests to the Zope web-application service.
8# probe: true
9
10# Source function library.
11. /etc/rc.d/init.d/functions
12
13CLIENT_HOME=/var/lib/zope
14
15RETVAL=0
16
17# See how we were called.
18case "$1" in
19 start)
20 if [ -f /var/lock/subsys/zope ]; then
21 msg_already_running Zope
22 else
23 msg_starting Zope
24 busy
25 daemon zope-zserver
26 RETVAL=$?;
27 sleep 5
28 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/zope
29 fi
30 ;;
31 stop)
32 if [ -f /var/lock/subsys/zope ]; then
33 msg_stopping Zope
34 kill `cat ${CLIENT_HOME}/Z2.pid`
35 sleep 1
36 deltext
37 ok
38 rm -f /var/lock/subsys/zope >/dev/null 2>&1
39 else
40 msg_not_running Zope
41 exit 1
42 fi
43 ;;
44 status)
45 if ps -p `cat ${CLIENT_HOME}/Z2.pid | awk '{print $2}'` >/dev/null; then
46 RETVAL=$?
47 nls "Zope (pid %s) is running" "`cat ${CLIENT_HOME}/Z2.pid`"
48 else
49 msg_not_running Zope
50 RETVAL=1
51 fi
52 ;;
53 restart|reload)
54 $0 stop
55 $0 start
56 ;;
57 *)
58 msg_Usage "$0 {start|stop||restart|reload|status}"
59 exit 1
60 ;;
61esac
62
63exit $RETVAL
This page took 0.055994 seconds and 4 git commands to generate.