# HG changeset patch # User robcast # Date 1012939055 -3600 # Node ID b72385d8d859b0a8b63079bf5750e7444c008312 # Parent 39ee473b4711047d304271a8ed1efb6647a020e9 Changed from using "ps|grep" to "pgrep" (ps behaves differently under SuSE 7.x) diff -r 39ee473b4711 -r b72385d8d859 config/tomcat/bin/rctomcat --- 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