AMQ-8226 match any amount of spaces before activemq PID in bin/activemq startup script

(cherry picked from commit f1190f8feddb68e27eb1b7484f2a0928e32996f9)
This commit is contained in:
charlie-aws 2021-04-15 16:07:14 -07:00 committed by jbonofre
parent 82a169c538
commit ec95c6f948

View File

@ -476,7 +476,7 @@ checkRunning(){
return 2
fi
local activemq_pid="`cat "$pidfile"`"
local RET="`ps -o "pid,args" | grep "^$activemq_pid\s.*java"`"
local RET="`ps -o "pid,args" | grep "^\s*$activemq_pid\s.*java"`"
if [ -n "$RET" ];then
return 0;
else