]> git.pld-linux.org Git - packages/Zope.git/blob - Zope.init
- cleaning
[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 # Source networking configuration.
14 . /etc/sysconfig/network
15
16 # Check that networking is up.
17 if is_yes "${NETWORKING}"; then
18         if [ ! -f /var/lock/subsys/network ]; then
19                 msg_network_down Zope
20                 exit 1
21         fi
22 else
23         exit 0
24 fi
25
26 CLIENT_HOME=/var/lib/zope
27
28 RETVAL=0
29
30 # See how we were called.
31 case "$1" in
32   start)
33         if [ -f /var/lock/subsys/zope ]; then
34                 msg_already_running Zope
35         else    
36                 msg_starting Zope
37                 busy
38                 daemon zope-zserver
39                 RETVAL=$?;
40                 sleep 5
41                 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/zope
42         fi
43         ;;
44   stop)
45         if [ -f /var/lock/subsys/zope ]; then
46                 msg_stopping Zope
47                 kill `cat ${CLIENT_HOME}/Z2.pid`
48                 sleep 1
49                 deltext
50                 ok
51                 rm -f /var/lock/subsys/zope >/dev/null 2>&1
52         else
53                 msg_not_running Zope
54                 exit 1
55         fi
56         ;;
57   status)
58         if ps -p `cat ${CLIENT_HOME}/Z2.pid | awk '{print $2}'` >/dev/null; then
59                 RETVAL=$?
60                 nls "Zope (pid %s) is running" "`cat ${CLIENT_HOME}/Z2.pid`"
61         else     
62                 msg_not_running Zope
63                 RETVAL=1
64         fi
65         ;;
66   restart|reload)
67         $0 stop
68         $0 start
69         ;;
70   *)
71         msg_usage "$0 {start|stop|restart|reload|status}"
72         exit 1
73         ;;
74 esac
75
76 exit $RETVAL
This page took 0.083163 seconds and 4 git commands to generate.