diff --git a/www/tomcat41/files/tomcat41.sh.in b/www/tomcat41/files/tomcat41.sh.in index bc87ede6d9d4..15c8fd53658e 100644 --- a/www/tomcat41/files/tomcat41.sh.in +++ b/www/tomcat41/files/tomcat41.sh.in @@ -112,6 +112,9 @@ if [ -f $pidfile ]; then procname=`ps -o ucomm= $rc_pid` fi fi +if [ -z "$procname" ]; then + procname=nonexistent +fi required_files="${tomcat%%TOMCAT_VERSION%%_catalina_home}/conf/server.xml" @@ -128,7 +131,7 @@ pid_touch () } tomcat%%TOMCAT_VERSION%%_stop() { - rc_pid=$(check_pidfile $pidfile *$procname*) + rc_pid=$(check_pidfile $pidfile $procname) if [ -z "$rc_pid" ]; then [ -n "$rc_fast" ] && return 0 diff --git a/www/tomcat55/files/tomcat55.sh.in b/www/tomcat55/files/tomcat55.sh.in index cc636515af79..50fd3addd84a 100644 --- a/www/tomcat55/files/tomcat55.sh.in +++ b/www/tomcat55/files/tomcat55.sh.in @@ -112,6 +112,9 @@ if [ -f $pidfile ]; then procname=`ps -o ucomm= -p $rc_pid` fi fi +if [ -z "$procname" ]; then + procname=nonexistent +fi required_files="${tomcat%%TOMCAT_VERSION%%_catalina_home}/conf/server.xml" @@ -128,7 +131,7 @@ pid_touch () } tomcat%%TOMCAT_VERSION%%_stop() { - rc_pid=$(check_pidfile $pidfile *$procname*) + rc_pid=$(check_pidfile $pidfile $procname) if [ -z "$rc_pid" ]; then [ -n "$rc_fast" ] && return 0 diff --git a/www/tomcat6/files/tomcat6.sh.in b/www/tomcat6/files/tomcat6.sh.in index bc87ede6d9d4..15c8fd53658e 100644 --- a/www/tomcat6/files/tomcat6.sh.in +++ b/www/tomcat6/files/tomcat6.sh.in @@ -112,6 +112,9 @@ if [ -f $pidfile ]; then procname=`ps -o ucomm= $rc_pid` fi fi +if [ -z "$procname" ]; then + procname=nonexistent +fi required_files="${tomcat%%TOMCAT_VERSION%%_catalina_home}/conf/server.xml" @@ -128,7 +131,7 @@ pid_touch () } tomcat%%TOMCAT_VERSION%%_stop() { - rc_pid=$(check_pidfile $pidfile *$procname*) + rc_pid=$(check_pidfile $pidfile $procname) if [ -z "$rc_pid" ]; then [ -n "$rc_fast" ] && return 0 diff --git a/www/tomcat7/files/tomcat6.sh.in b/www/tomcat7/files/tomcat6.sh.in index bc87ede6d9d4..15c8fd53658e 100644 --- a/www/tomcat7/files/tomcat6.sh.in +++ b/www/tomcat7/files/tomcat6.sh.in @@ -112,6 +112,9 @@ if [ -f $pidfile ]; then procname=`ps -o ucomm= $rc_pid` fi fi +if [ -z "$procname" ]; then + procname=nonexistent +fi required_files="${tomcat%%TOMCAT_VERSION%%_catalina_home}/conf/server.xml" @@ -128,7 +131,7 @@ pid_touch () } tomcat%%TOMCAT_VERSION%%_stop() { - rc_pid=$(check_pidfile $pidfile *$procname*) + rc_pid=$(check_pidfile $pidfile $procname) if [ -z "$rc_pid" ]; then [ -n "$rc_fast" ] && return 0