mirror of https://github.com/apache/activemq.git
create a pidfile for a console run
this adds a pidfile which contains the pid of the running shellscript if activemq is run by "console". This prevents problems if someone tries to to use i.e. the start/stop options while some is debugging activemq in foreground mode.
This commit is contained in:
parent
02a94143db
commit
0eb45b434d
|
@ -449,8 +449,12 @@ invoke_console(){
|
||||||
COMMANDLINE_ARGS="start `echo $COMMANDLINE_ARGS|sed 's,^console,,'`"
|
COMMANDLINE_ARGS="start `echo $COMMANDLINE_ARGS|sed 's,^console,,'`"
|
||||||
EXEC_OPTION="exec"
|
EXEC_OPTION="exec"
|
||||||
echo "INFO: Starting in foreground, this is just for debugging purposes (stop process by pressing CTRL+C)"
|
echo "INFO: Starting in foreground, this is just for debugging purposes (stop process by pressing CTRL+C)"
|
||||||
|
echo "INFO: Creating pidfile $ACTIVEMQ_PIDFILE"
|
||||||
|
echo "$$" > $ACTIVEMQ_PIDFILE
|
||||||
invokeJar
|
invokeJar
|
||||||
exit "$?"
|
RET="$?"
|
||||||
|
echo "INFO: removing pidfile $ACTIVEMQ_PIDFILE"
|
||||||
|
exit "$RET"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Stop ActiveMQ
|
# Stop ActiveMQ
|
||||||
|
|
Loading…
Reference in New Issue