You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by francesco <fr...@unimore.it> on 2015/11/26 08:30:23 UTC
systemd startup scripts for activemq
Hi all,
I would like activemq to be started by systemd.
I know about the very good activemq startup scripts in ./bin directory of
the downloaded .tar.gz but I am unable to write a good enough
/etc/systemd/system/activemq.service.
Can anybody share her own script?
thank you,
Francesco
--
View this message in context: http://activemq.2283324.n4.nabble.com/systemd-startup-scripts-for-activemq-tp4704301.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: systemd startup scripts for activemq
Posted by davidh <da...@agenor.co.uk>.
I came looking for activemq systemd config file. I notice the position
francesco got to acted as a wrapper round the console, whereas I was keen to
get a "forking" version working.
I managed to get the following working - in
/etc/systemd/system/activemq.myinstance.service
#####
[Unit]
Description = ActiveMQ
After = syslog.target network.target
[Service]
User=activemq
PIDFile=/usr/local/activemq/myinstance/data/activemq.pid
ExecStart=/usr/local/activemq/myinstance/bin/myinstance start
ExecStop=/usr/local/activemq/myinstance/bin/myinstance stop
ExecReload=/usr/local/activemq/myinstance/bin/myinstance restart
Type = forking
[Install]
WantedBy = multi-user.target
#####
But only after adding a bash header ("#!/bin/bash") to
/usr/local/activemq/myinstance/bin/myinstance script - generated from
"activemq create myinstance". Without this header starting gives an
"(code=exited, status=203/EXEC)" when running systemctl.
--
View this message in context: http://activemq.2283324.n4.nabble.com/systemd-startup-scripts-for-activemq-tp4704301p4719499.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: systemd startup scripts for activemq
Posted by francesco <fr...@unimore.it>.
at the very last, this one worked for me:
[Unit]
Description=ActiveMQ async message broker
After=network.target
[Service]
PrivateTmp=true
PIDFile=/opt/activemq/data/activemq-your_server_name.pid
Type=simple
#Environment=JAVA_HOME=/usr/jvm/lib/latest
User=activemq
Group=activemq
ExecStart=/opt/activemq/bin/activemq console
[Install]
WantedBy=multi-user.target
--
View this message in context: http://activemq.2283324.n4.nabble.com/systemd-startup-scripts-for-activemq-tp4704301p4704306.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: systemd startup scripts for activemq
Posted by francesco <fr...@unimore.it>.
Just as a starting point, this is my first try:
[Unit]
Description=ActiveMQ async message broker
After=network.target
[Service]
PrivateTmp=true
PIDFile=/opt/activemq/data/activemq-gimcrack.pid
Type=forking
Environment=JAVA_HOME=/usr/jvm/lib/latest
ExecStart=/opt/activemq/bin/activemq start
[Install]
WantedBy=multi-user.target
ciao,
Francesco
--
View this message in context: http://activemq.2283324.n4.nabble.com/systemd-startup-scripts-for-activemq-tp4704301p4704305.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.