viviotech / lucee-installer

BitRock Installer XML config and files for the Lucee installers
http://lucee.viviotech.net/
9 stars 2 forks source link

shutdown method update in railo_ctl #61

Closed utdream closed 9 years ago

utdream commented 9 years ago

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
utdream commented 9 years ago

Implemented in Tomcat 8 for Lucee installers 4.5.1.022

utdream commented 9 years ago

https://github.com/utdream/CFML-Installers/wiki/Lucee-Installer-Release-Notes