By the way, I will create a Jira about that.

Regards
JB

On 18/11/2021 15:08, Jean-Baptiste Onofré wrote:
Hi,

It depends how you start activemq.

If you use your own script, or bin/activemq console, or wrapper, it works.

For instance, I rarely use bin/activemq start|stop.

Anyway, a fix is required for sure, probably testing the environment.

I will fix that for 5.16.4.

Regards
JB

On 11/11/2021 21:04, J P wrote:
hmm... then at least I understand why the script is like it is :)

Still, I am surprised if no one else has already reported this;
to me the script as it stands, seems quite unworkable in any
real-world/prod environment...

If one can somehow detect that the environment is busybox (uname -a ,
perhaps?),
one could decide whether to include the -e flag or not.

Otherwise, I think something like this would work as a generic fix?

ps -e > /dev/null 2>&1
status=$?
if [[ "0" = "$status" ]]; then
   local RET="`ps -eo "pid,args" | grep "^\s*$activemq_pid\s.*java"`"
else
   local RET="`ps -o "pid,args"  | grep "^\s*$activemq_pid\s.*java"`"
fi

Reply via email to