From 56cc1dee84c0793aed116417146433a6ab9a6419 Mon Sep 17 00:00:00 2001 From: Coty Sutherland Date: Aug 05 2016 13:57:40 +0000 Subject: Related: rhbz#1314177 Forgot to commit to init change... --- diff --git a/tomcat-7.0.init b/tomcat-7.0.init index f5269f5..f1b6d2d 100644 --- a/tomcat-7.0.init +++ b/tomcat-7.0.init @@ -288,7 +288,7 @@ case "$1" in RETVAL="1" fi else - pid="$(/usr/bin/pgrep -d , -u ${TOMCAT_USER} -G ${TOMCAT_USER} java)" + pid="$(/usr/bin/pgrep -d , -u ${TOMCAT_USER} -G ${TOMCAT_USER} -f \"${NAME}[ $]\")" if [ -z "$pid" ]; then # status ${NAME} # RETVAL="$?" @@ -300,7 +300,7 @@ case "$1" in fi fi if [ -f /var/lock/subsys/${NAME} ]; then - pid="$(/usr/bin/pgrep -d , -u ${TOMCAT_USER} -G ${TOMCAT_USER} java)" + pid="$(/usr/bin/pgrep -d , -u ${TOMCAT_USER} -G ${TOMCAT_USER} -f \"${NAME}[ $]\")" # The lockfile exists but the process is not running if [ -z "$pid" ]; then log_failure_msg "${NAME} lockfile exists but process is not running"