--- activemq 2016-03-19 13:06:51.077511599 +0100 +++ activemq 2016-03-19 13:08:24.060505997 +0100 @@ -120,7 +120,7 @@ debug "pid file ($_pidfile): no pid in file." return fi - if [ -n "`/usr/local/bin/jps -l | grep -e "^$_pid $jar_file\$"`" ]; then + if [ -n "`sudo -u $activemq_user /usr/local/bin/jps -l | grep -e "^$_pid $jar_file\$"`" ]; then echo -n $_pid fi }