Mercurial > hg > digilib
comparison config/tomcat/bin/rctomcat @ 26: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 | 0bc4fc1b91a5 |
children |
comparison
equal
deleted
inserted
replaced
25:39ee473b4711 | 26:b72385d8d859 |
---|---|
9 | 9 |
10 # Force execution if not called by a runlevel directory. | 10 # Force execution if not called by a runlevel directory. |
11 #test $link = $base && START_XNTPD=yes | 11 #test $link = $base && START_XNTPD=yes |
12 #test "$START_XNTPD" = yes || exit 0 | 12 #test "$START_XNTPD" = yes || exit 0 |
13 | 13 |
14 TOMCAT_PID=""; | |
15 | |
16 function tomcat_runs() { | |
17 # we're looking at java vms executing org.apache.catalina.startup.Bootstrap | |
18 ALL_TOMS=$( ps xa|grep org.apache.catalina.startup.Bootstrap|grep -v grep ) | |
19 ALL_TOM_IDS=$( echo $ALL_TOMS | cut -d " " -f 1 ) | |
20 TOMCAT_PID=$( echo $ALL_TOM_IDS | head -1 ) | |
21 test -n "$TOMCAT_PID" | |
22 } | |
23 | |
24 # | 14 # |
25 # docuservers tomcat (ROC 2.11.01) | 15 # docuservers tomcat (ROC 2.11.01) |
26 # | 16 # |
27 TOMCATLOG=/usr/local/httpd/logs/tomcat-err.log | 17 TOMCATLOG=/usr/local/httpd/logs/tomcat-err.log |
28 TOMCATDIR=/opt/tomcat | 18 TOMCATDIR=/opt/tomcat |
19 | |
20 TOMCAT_PID=""; | |
21 | |
22 function tomcat_runs() { | |
23 # we're looking at java vms executing org.apache.catalina.startup.Bootstrap | |
24 #ALL_TOMS=$( ps xa | grep org.apache.catalina.startup | grep -v grep ) | |
25 #ALL_TOM_IDS=$( echo $ALL_TOMS | cut -d " " -f 1 ) | |
26 ALL_TOMS=$( pgrep -u wwwrun java ) | |
27 TOMCAT_PID=$( echo $ALL_TOMS | head -1 ) | |
28 test -n "$TOMCAT_PID" | |
29 } | |
29 | 30 |
30 return="$rc_done" | 31 return="$rc_done" |
31 | 32 |
32 case "$1" in | 33 case "$1" in |
33 start) | 34 start) |