...
Anchor | ||||
---|---|---|---|---|
|
For now see here
Later, something Something like this should work:
chmod +x /etc/init.d/activemq
chkconfig --add activemq
chkconfig activemq on
/etc/init.d/activemq start
...
/home/activemq/activemq-start.sh
...
No Format |
---|
#!/bin/bash echo Starting ActiveMQ.... sh /usr/local/apache-activemq-x.y.z/bin/activemq start |
...
/home/activemq/activemq-stop.sh
...
No Format |
---|
#!/bin/bash echo Stopping ActiveMQ.... sh /usr/local/apache-activemq-x.y.z/bin/activemq stop |
...
/etc/init.d/activemq
...
No Format |
---|
#!/bin/bash # # activemq Starts ActiveMQ. # # chkconfig: 345 88 12 # description: ActiveMQ is a JMS Messaging Queue Server. ### BEGIN INIT INFO # Provides: $activemq ### END INIT INFO # Source function library. . /etc/init.d/functions [ -f /home/activemq/activemq-start.sh ] || exit 0 [ -f /home/activemq/activemq-stop.sh ] || exit 0 RETVAL=0 umask 077 start() { echo -n $"Starting ActiveMQ: " daemon su -c /home/activemq/activemq-start.sh activemq echo return $RETVAL } stop() { echo -n $"Shutting down ActiveMQ: " daemon su -c /home/activemq/activemq-stop.sh activemq echo return $RETVAL } restart() { stop start } case "$1" in start) start ;; stop) stop ;; restart|reload) restart ;; *) echo $"Usage: $0 {start|stop|restart}" exit 1 esac exit $? |