]> git.pld-linux.org Git - packages/Zope.git/blob - Zope.init
- cleanups and cosmetics,
[packages/Zope.git] / Zope.init
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
13 CLIENT_HOME=/var/lib/zope
14
15 RETVAL=0
16
17 # See how we were called.
18 case "$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             echo "Zope (pid `cat ${CLIENT_HOME}/Z2.pid`) is running"
48         else     
49             msg_not_running Zope
50             RETVAL=1
51         fi
52     
53         ;;
54   restart)
55         $0 stop
56         $0 start
57         ;;
58   *)
59         msg_Usage "$0 {start|stop|status|restart}"
60         exit 1
61         ;;
62 esac
63
64 exit $RETVAL
This page took 0.032011 seconds and 3 git commands to generate.