Right now the railo_ctl script issues the Tomcat shutdown script, and then performs a wait. However, this wait is not currently useful as the shutdown script will wait for the default 5 seconds (and then fail if the shutdown is uneffective past that time) before allowing the process to continue to the wait script.
To address this, we can background process the Tomcat shutdown's own wait, which will allow the railo_ctl thread to continue and process the PID check for the set time period (I'm thinking 10 seconds atm). To accomplish this, we need to update this bit:
su -p -s /bin/sh $TOMCAT_OWNER $CATALINA_HOME/bin/shutdown.sh
COUNT=0
while [ $PID_FOUND -eq 1 ] ; do
findpid
COUNT=$(($COUNT+1))
if [ $COUNT -gt 20 ] ; then
break
fi
to this:
su -p -s /bin/sh $TOMCAT_OWNER $CATALINA_HOME/bin/shutdown.sh 10 &
COUNT=0
while [ $PID_FOUND -eq 1 ] ; do
findpid
COUNT=$(($COUNT+1))
if [ $COUNT -gt 10 ] ; then
break
fi
Right now the railo_ctl script issues the Tomcat shutdown script, and then performs a wait. However, this wait is not currently useful as the shutdown script will wait for the default 5 seconds (and then fail if the shutdown is uneffective past that time) before allowing the process to continue to the wait script.
To address this, we can background process the Tomcat shutdown's own wait, which will allow the railo_ctl thread to continue and process the PID check for the set time period (I'm thinking 10 seconds atm). To accomplish this, we need to update this bit:
to this: