From 825a5f0e558f8e66560631b3f7154327f552478d Mon Sep 17 00:00:00 2001
From: felmer <felmer>
Date: Wed, 17 Aug 2011 08:24:46 +0000
Subject: [PATCH] LMS-2329 improved installation script: It also scans
 jetty.out

SVN: 22520
---
 installation/resource/installer/bin/bisup.sh | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/installation/resource/installer/bin/bisup.sh b/installation/resource/installer/bin/bisup.sh
index 222f2a53834..12829e47906 100755
--- a/installation/resource/installer/bin/bisup.sh
+++ b/installation/resource/installer/bin/bisup.sh
@@ -3,6 +3,7 @@
 
 STARTING_MESSAGE="STARTING SERVER"
 STARTED_MESSAGE="SERVER STARTED"
+JETTY_STARTED_MESSAGE="Successfully started component "
 ERROR_MESSAGE="ERROR"
 
 BASE=`dirname "$0"`
@@ -12,6 +13,7 @@ fi
 
 JETTY_HOME=$BASE/../servers/openBIS-server/jetty/
 OPENBIS_LOG=$JETTY_HOME/logs/openbis_log.txt
+JETTY_LOG=$JETTY_HOME/logs/jetty.out
 
 echo Starting openBIS...
 echo $STARTING_MESSAGE >> $OPENBIS_LOG
@@ -24,8 +26,10 @@ for i in {1..120}; do
     
     started=`egrep -R "($STARTING_MESSAGE|$STARTED_MESSAGE)" $OPENBIS_LOG | tail -1 | grep "$STARTED_MESSAGE"`
     if [ -n "$started" ]; then
-        echo "Done."
-        exit 0;
+        started=`egrep -R "$JETTY_STARTED_MESSAGE" $JETTY_LOG | tail -1 | grep "$JETTY_STARTED_MESSAGE"`
+        if [ -n "$started" ]; then
+            echo "Done."
+            exit 0;
     fi
     
     error=`egrep -R "($STARTING_MESSAGE|$ERROR_MESSAGE)" $OPENBIS_LOG | tail -1 | grep "$ERROR_MESSAGE"`
@@ -34,6 +38,12 @@ for i in {1..120}; do
         exit 1;
     fi
     
+    error=`egrep -R "$ERROR_MESSAGE" $JETTY_LOG | tail -1 | grep "$ERROR_MESSAGE"`
+    if [ -n "$error" ]; then
+        echo "Failed: $error" 
+        exit 1;
+    fi
+    
 done
 
 
-- 
GitLab