changeset 29:b72385d8d859

Changed from using "ps|grep" to "pgrep" (ps behaves differently under SuSE 7.x)
author robcast
date Tue, 05 Feb 2002 20:57:35 +0100
parents 39ee473b4711
children 8dbd7b41d591
files config/tomcat/bin/rctomcat
diffstat 1 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/config/tomcat/bin/rctomcat	Tue Feb 05 20:48:05 2002 +0100
+++ b/config/tomcat/bin/rctomcat	Tue Feb 05 20:57:35 2002 +0100
@@ -11,22 +11,23 @@
 #test $link = $base && START_XNTPD=yes
 #test "$START_XNTPD" = yes || exit 0
 
-TOMCAT_PID="";
-
-function tomcat_runs() {
-# we're looking at java vms executing org.apache.catalina.startup.Bootstrap
-ALL_TOMS=$( ps xa|grep org.apache.catalina.startup.Bootstrap|grep -v grep )
-ALL_TOM_IDS=$( echo $ALL_TOMS | cut -d " " -f 1 )
-TOMCAT_PID=$( echo $ALL_TOM_IDS | head -1 )
-test -n "$TOMCAT_PID"
-}
-
 #
 # docuservers tomcat (ROC 2.11.01)
 #
 TOMCATLOG=/usr/local/httpd/logs/tomcat-err.log
 TOMCATDIR=/opt/tomcat
 
+TOMCAT_PID="";
+
+function tomcat_runs() {
+# we're looking at java vms executing org.apache.catalina.startup.Bootstrap
+#ALL_TOMS=$( ps xa | grep org.apache.catalina.startup | grep -v grep )
+#ALL_TOM_IDS=$( echo $ALL_TOMS | cut -d " " -f 1 )
+ALL_TOMS=$( pgrep -u wwwrun java )
+TOMCAT_PID=$( echo $ALL_TOMS | head -1 )
+test -n "$TOMCAT_PID"
+}
+
 return="$rc_done"
 
 case "$1" in