6 ACTIVEMQ_HOME
=/opt
/activemq
7 PIDFILE
="$ACTIVEMQ_HOME/data/activemq.pid"
11 [ ! -f "$PIDFILE" ] && return 1
12 local PID
=$
(cat "$PIDFILE" 2> /dev
/null
)
13 [ -z "$PID" ] && return 1
14 if [ ! -d "/proc/$PID" ]; then
15 rm -f "$PIDFILE" 2> /dev
/null
23 local PID
=$
(cat "$PIDFILE" 2> /dev
/null
)
24 kill $PID &> /dev
/null
33 while check_pid
; do sleep 1; done
38 stat_busy
"Starting ActiveMQ"
39 check_pid || JAVA_HOME
=/opt
/java
$ACTIVEMQ_HOME/bin
/activemq start
>/dev
/null
2>&1 &
48 stat_busy
"Stopping ActiveMQ"
62 echo "usage: $0 {start|stop|restart}"