Created
August 20, 2013 00:15
-
-
Save aaronwalker/6275695 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # chkconfig: 345 88 12 | |
| # description: Karaf is a java container. | |
| ### BEGIN INIT INFO | |
| # Provides: $activemq | |
| ### END INIT INFO | |
| . /etc/init.d/functions | |
| . /etc/profile.d/java.sh | |
| RETVAL=0 | |
| umask 077 | |
| start() { | |
| echo -n $"Starting Karaf (fuseMQ): " | |
| su -c /opt/fuse/fuse-mq-7.0.2.fuse-097/bin/start fusemq | |
| echo | |
| return $RETVAL | |
| } | |
| stop() { | |
| echo -n $"Shutting down Karaf (fuseMQ): " | |
| su -c /opt/fuse/fuse-mq-7.0.2.fuse-097/bin/stop fusemq | |
| echo | |
| return $RETVAL | |
| } | |
| client() { | |
| echo -n $"Starting Karaf client (fuseMQ) " | |
| su -c /opt/fuse/fuse-mq-7.0.2.fuse-097/bin/client fusemq | |
| echo | |
| return $RETVAL | |
| } | |
| restart() { | |
| stop | |
| start | |
| } | |
| case "$1" in | |
| start) | |
| start | |
| ;; | |
| stop) | |
| stop | |
| ;; | |
| client) | |
| client | |
| ;; | |
| restart|reload) | |
| restart | |
| ;; | |
| *) | |
| echo $"Usage: $0 {start|stop|client|restart}" | |
| exit 1 | |
| esac | |
| exit $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment