3 # mcollective Application Server for STOMP based agents
7 # description: mcollective lets you build powerful Stomp compatible middleware clients in ruby without having to worry too
8 # much about all the setup and management of a Stomp connection, it also provides stats, logging and so forth
12 # Provides: mcollective
13 # Required-Start: $remote_fs
14 # Required-Stop: $remote_fs
15 # Default-Start: 2 3 4 5
17 # Short-Description: Start daemon at boot time
18 # Description: Enable service provided by daemon.
21 mcollectived="/usr/sbin/mcollectived"
24 if [ -d /var/lock/subsys ]; then
25 # RedHat/CentOS/etc who use subsys
26 lock="/var/lock/subsys/mcollective"
29 lock="/var/lock/mcollective"
34 pidfile="/var/run/mcollectived.pid"
36 # Source function library.
37 . /lib/lsb/init-functions
39 # Check that binary exists
40 if ! [ -f $mcollectived ]
42 echo "mcollectived binary not found"
46 # See how we were called.
49 echo -n "Starting mcollective: "
51 if [ -f ${lock} ]; then
52 # we were not shut down correctly
53 if [ -s ${pidfile} ]; then
54 kill `cat ${pidfile}` >/dev/null 2>&1
64 ${mcollectived} --pid=${pidfile} --config="/etc/mcollective/server.cfg"
75 echo -n "Shutting down mcollective: "
77 if [ -s ${pidfile} ]; then
78 kill `cat ${pidfile}` >/dev/null 2>&1
99 if [ -f ${lock} ]; then
100 if [ -s ${pidfile} ]; then
101 if [ -e /proc/`cat ${pidfile}` ]; then
102 echo "mcollectived (`cat ${pidfile}`) is running"
105 echo "mcollectived (`cat ${pidfile}`) is NOT running"
110 echo "mcollectived: service not started"
115 echo "not implemented"
118 echo "Usage: mcollectived {start|stop|restart|condrestart|status}"