Skip to content

Instantly share code, notes, and snippets.

@haad
Created October 28, 2013 09:21
Show Gist options
  • Save haad/7193759 to your computer and use it in GitHub Desktop.
Save haad/7193759 to your computer and use it in GitHub Desktop.
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