Start of changes to allow service to run with tomcat6 and Sun Java6.

This commit is contained in:
Juan Carlos Luciani
2008-07-17 17:35:59 +00:00
parent 794730a1ce
commit 98a2a66e2a
9 changed files with 304 additions and 16 deletions

View File

@@ -56,7 +56,8 @@ atsIsRunning()
ats_ps_log=`mktemp /var/tmp/ats-ps.log.XXXXXX`
ps aux --cols 1024 >"$ats_ps_log"
ats_is_running="false"
if grep " -Dcatalina.base=$CATALINA_BASE.*-Dcatalina.home=$CATALINA_HOME.*org.apache.catalina.startup.Bootstrap" "$ats_ps_log" >/dev/null 2>/dev/null ; then
#if grep " -Dcatalina.base=$CATALINA_BASE.*-Dcatalina.home=$CATALINA_HOME.*org.apache.catalina.startup.Bootstrap" "$ats_ps_log" >/dev/null 2>/dev/null ; then
if grep "$DAEMON_USER" "$ats_ps_log" >/dev/null 2>/dev/null ; then
ats_is_running="true"
fi
rm -f "$ats_ps_log"
@@ -121,7 +122,7 @@ StartDAEMON()
fi
# Start it up
su $DAEMON_USER -s /bin/bash -c "$CATALINA_HOME/bin/startup.sh" >"$CATALINA_BASE/logs/start.log" 2>&1
su $DAEMON_USER -s /bin/bash -c "$CATALINA_START_CMD" >"$CATALINA_BASE/logs/start.log" 2>&1
sleep 1
if atsIsRunning ; then
rc_failed 0
@@ -158,7 +159,7 @@ StopDAEMON()
## Stop daemon with killproc(8) and if this fails
## set echo the echo return value.
if atsIsRunning ; then
su $DAEMON_USER -s /bin/bash -c "$CATALINA_HOME/bin/shutdown.sh" >"$CATALINA_BASE/logs/stop.log" 2>&1
su $DAEMON_USER -s /bin/bash -c "$CATALINA_STOP_CMD" >"$CATALINA_BASE/logs/stop.log" 2>&1
# wait 60 sec for stop at maximum
wait_sec=60
while [ "$wait_sec" != "0" ] ; do