You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by davidh <da...@agenor.co.uk> on 2016/11/25 14:14:53 UTC

Re: systemd startup scripts for activemq

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.