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"