1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#!/bin/sh # Start/stop/restart Apache ActiveMQ daemon DAEMON="/usr/share/activemq/bin/activemq" . /etc/default/activemq case "$1" in 'start') mkdir -p /tmp/activemq chown $ACTIVEMQ_USER /tmp/activemq ${DAEMON} start ;; 'stop') ${DAEMON} stop ;; 'restart') ${DAEMON} stop sleep 1 ${DAEMON} start ;; *) echo "usage $0 start|stop|restart" esac