From 1ef36583d8eb8f57f947f04cb04e1464ed786a9d Mon Sep 17 00:00:00 2001 From: Alejandro Pulver Date: Sun, 30 Sep 2007 22:04:02 +0000 Subject: [PATCH] - Fix problems with the "status" command in the wrapper script when the daemon is not started. PR: ports/116729 Submitted by: alepulver (myself) Approved by: "Tong Liu" (maintainer of tomcat{41,6}), Tomas Verbaitis (maintainer of tomcat55) --- www/tomcat41/files/tomcat41.sh.in | 5 ++++- www/tomcat55/files/tomcat55.sh.in | 5 ++++- www/tomcat6/files/tomcat6.sh.in | 5 ++++- www/tomcat7/files/tomcat6.sh.in | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) 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