updated on Mon Jan 16 16:00:41 UTC 2012
[aur-mirror.git] / plone-beta / plone.daemon
blob7b6779df716f140bf096ba712fab093a65ce2f2b
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
7 pname=plone
10 case $1 in
11 start)
12 stat_busy "Starting Plone"
13 cmdline='su plone -c "/opt/Plone/Plone/zinstance/bin/instance start"'
15 eval $cmdline
16 if ck_daemon plone; then
17 stat_done
18 add_daemon plone
19 else
20 stat_fail
21 fi
25 stop)
26 stat_busy "Stopping Plone"
27 cmdline='su plone -c "/opt/Plone/Plone/zinstance/bin/instance stop"'
29 eval $cmdline
30 if ck_daemon plone; then
31 stat_fail
32 else
33 stat_done
34 rm_daemon plone
38 restart)
39 /etc/rc.d/plone stop
40 /etc/rc.d/plone start
42 status)
44 cmdline='su plone -c "/opt/Plone/Plone/zinstance/bin/instance status"'
45 eval $cmdline
48 echo "usage: $0 {start|stop|restart|status}"
52 esac