Author: alessio.soldano(a)jboss.com
Date: 2012-02-20 11:22:42 -0500 (Mon, 20 Feb 2012)
New Revision: 15693
Modified:
hudson/branches/jbossws-hudson-4.0.x/scripts/jboss.sh
hudson/branches/jbossws-hudson-4.0.x/scripts/jbossws-qa.sh
Log:
svnmerge -r 15690:15692
Modified: hudson/branches/jbossws-hudson-4.0.x/scripts/jboss.sh
===================================================================
--- hudson/branches/jbossws-hudson-4.0.x/scripts/jboss.sh 2012-02-20 15:49:53 UTC (rev
15692)
+++ hudson/branches/jbossws-hudson-4.0.x/scripts/jboss.sh 2012-02-20 16:22:42 UTC (rev
15693)
@@ -35,22 +35,27 @@
start)
# This version of run.sh obtains the pid of the JVM and saves it as jboss.pid
# It relies on bash specific features
- /bin/bash $RUN_CMD &
+ /bin/bash $RUN_CMD >/dev/null 2>/dev/null &
;;
stop)
if [ -f "$PIDFILE" ]; then
pid=`cat "$PIDFILE"`
- echo "kill pid: $pid"
- kill $pid
+ #find out the pid of the shell script that started AS and which should be in
background now
+ shell_pid=$(ps -ef | awk '$2 ~ /\<'$pid'\>/ { print $3; }')
+ echo "kill pid: $shell_pid"
+ kill $shell_pid
if [ "$?" -eq 0 ]; then
- # process exists, wait for it to die, and force if not
- sleep 20
- kill -9 $pid &> /dev/null
+ sleep 10
+ kill -9 $shell_pid &> /dev/null
fi
+ #try killing the AS process just in case it's still there
+ kill -9 $pid &> /dev/null
rm "$PIDFILE"
else
warn "No pid found!"
fi
+ echo "exiting stop method"
+ date
;;
restart)
$0 stop
Modified: hudson/branches/jbossws-hudson-4.0.x/scripts/jbossws-qa.sh
===================================================================
--- hudson/branches/jbossws-hudson-4.0.x/scripts/jbossws-qa.sh 2012-02-20 15:49:53 UTC
(rev 15692)
+++ hudson/branches/jbossws-hudson-4.0.x/scripts/jbossws-qa.sh 2012-02-20 16:22:42 UTC
(rev 15693)
@@ -76,7 +76,7 @@
# fi
# else
# echo "There's no admin console for AS7 yet"
- sleep 20
+ sleep 5
# fi
}