Created
October 28, 2013 09:21
-
-
Save haad/7193759 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
description "Innovatrics ActiveMQ startup script." | |
author "Innovatrics ActiveMQ" | |
start on runlevel [2345] | |
stop on runlevel [016] | |
#expect daemon | |
setuid activemq | |
respawn | |
env HOME="/opt/inn-activemq" | |
env DATA="/srv/inn-activemq/data" | |
env ACTIVEMQ_PIDFILE="/srv/inn-activemq/data/activemq.pid" | |
pre-start script | |
mkdir -p /srv/inn-activemq/data | |
chown activemq:activemq /srv/inn-activemq/data | |
mkdir -p /srv/inn-activemq/tmp | |
chown activemq:activemq /srv/inn-activemq/tmp | |
end script | |
exec start-stop-daemon --start -d ${HOME} -p ${ACTIVEMQ_PIDFILE} --exec ${HOME}/bin/activemq -- console -Dactivemq.clustername=$(hostname) -Djava.security.egd=file:///dev/urandom #-Djava.security.egd=file:///dev/urandom -Djavax.net.ssl.keyStore=/opt/inn-activemq/conf/broker.ks -Djavax.net.ssl.keyStorePassword=password | |
post-start script | |
sudo initctl emit inn-activemq-start | |
end script | |
post-stop script | |
# start-stop-daemon --stop -d ${HOME} -p ${ACTIVEMQ_PIDFILE} | |
sudo initctl emit inn-activemq-stop | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment