1 | #!/bin/sh |
---|
2 | # Zope zopectl script, from: |
---|
3 | # http://www.zope.org/Members/jonms/MacOSXService |
---|
4 | |
---|
5 | ZOPEDIR=%%DPPATH%% |
---|
6 | PATH=.:$PATH |
---|
7 | |
---|
8 | case "$1" in |
---|
9 | start) |
---|
10 | echo -n "Starting Zope" |
---|
11 | cd $ZOPEDIR |
---|
12 | $ZOPEDIR/start > var/error.log 2>&1 & |
---|
13 | echo ". Please wait a few moments for Zope to fully start." |
---|
14 | ;; |
---|
15 | stop) |
---|
16 | echo -n "Stopping Zope" |
---|
17 | cd $ZOPEDIR |
---|
18 | $ZOPEDIR/stop > var/error.log 2>&1 & |
---|
19 | rm -f var/pcgi.pid var/pcgi.soc |
---|
20 | echo ". Please wait a few moments for Zope to fully stop." |
---|
21 | ;; |
---|
22 | restart) |
---|
23 | $0 stop |
---|
24 | sleep 3 |
---|
25 | $0 start |
---|
26 | ;; |
---|
27 | reload) |
---|
28 | $0 restart |
---|
29 | ;; |
---|
30 | *) |
---|
31 | echo "Usage: zopectl [start|stop|restart|reload]" |
---|
32 | exit 1 |
---|
33 | ;; |
---|
34 | esac |
---|
35 | |
---|
36 | exit 0 |
---|