IDEMPIERE-3023 Update Dead Sessions when Server Shutdown

This commit is contained in:
Carlos Ruiz 2016-06-05 15:20:59 -05:00
parent 6053ee4db6
commit 38b12af349
3 changed files with 4 additions and 4 deletions

View File

@ -632,7 +632,7 @@ stop () {
if [ $IDEMPIERESTATUS -ne 0 ] ; then if [ $IDEMPIERESTATUS -ne 0 ] ; then
log_success_msg "Service stopped with kill -15" log_success_msg "Service stopped with kill -15"
else else
echo "Trying direct kill with signal -9" log_warning_msg "Trying direct kill with signal -9"
kill -9 -`ps ax o pgid,command | grep -v grep | grep $IDEMPIERE_HOME | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` kill -9 -`ps ax o pgid,command | grep -v grep | grep $IDEMPIERE_HOME | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5 sleep 5
getidempierestatus getidempierestatus

View File

@ -102,7 +102,7 @@ stop () {
if [ $IDEMPIERESTATUS -ne 0 ] ; then if [ $IDEMPIERESTATUS -ne 0 ] ; then
log_success_msg "Service stopped with kill -15" log_success_msg "Service stopped with kill -15"
else else
echo "Trying direct kill with signal -9" log_warning_msg "Trying direct kill with signal -9"
kill -9 -`ps ax o pgid,command | grep -v grep | grep $IDEMPIERE_HOME | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` kill -9 -`ps ax o pgid,command | grep -v grep | grep $IDEMPIERE_HOME | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5 sleep 5
getidempierestatus getidempierestatus

View File

@ -85,13 +85,13 @@ stop () {
cd $IDEMPIERE_HOME/utils cd $IDEMPIERE_HOME/utils
source $ENVFILE source $ENVFILE
# try shutdown from OSGi console, then direct kill with signal 15, then signal 9 # try shutdown from OSGi console, then direct kill with signal 15, then signal 9
log_warning_msg "Trying shutdown from OSGi console" echo "Trying shutdown from OSGi console"
( echo exit; echo y; sleep 5 ) | telnet localhost 12612 > /dev/null 2>&1 ( echo exit; echo y; sleep 5 ) | telnet localhost 12612 > /dev/null 2>&1
getidempierestatus getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then if [ $IDEMPIERESTATUS -ne 0 ] ; then
echo_success echo_success
else else
log_warning_msg "Trying direct kill with signal -15" echo "Trying direct kill with signal -15"
kill -15 -`ps ax o pgid,command | grep -v grep | grep $IDEMPIERE_HOME | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` kill -15 -`ps ax o pgid,command | grep -v grep | grep $IDEMPIERE_HOME | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5 sleep 5
getidempierestatus getidempierestatus