[jbpm-commits] JBoss JBPM SVN: r3679 - jbpm3/trunk/hudson/jboss/bin.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Jan 20 02:15:09 EST 2009


Author: thomas.diesler at jboss.com
Date: 2009-01-20 02:15:09 -0500 (Tue, 20 Jan 2009)
New Revision: 3679

Modified:
   jbpm3/trunk/hudson/jboss/bin/http-spider.sh
Log:
Run wget only when it exists

Modified: jbpm3/trunk/hudson/jboss/bin/http-spider.sh
===================================================================
--- jbpm3/trunk/hudson/jboss/bin/http-spider.sh	2009-01-19 23:36:52 UTC (rev 3678)
+++ jbpm3/trunk/hudson/jboss/bin/http-spider.sh	2009-01-20 07:15:09 UTC (rev 3679)
@@ -32,23 +32,21 @@
 
 which wget > /dev/null
 WGET_EXISTS=$?
-if [ $WGET_EXISTS -ne 0 ]; then
-   exit 1
+if [ $WGET_EXISTS -e 0 ]; then
+	COUNTER=0
+	while [  $COUNTER -lt $NUM_RETRIES ]; do
+		if wget --spider --timeout=$TIMEOUT --tries=1 $1 &> /dev/null; then
+			touch $2/spider.success
+			echo "Try $COUNTER: '$1' is available"	> ./spider.success
+			exit 0
+		else
+			echo "Try $COUNTER: '$1' does not respond, wait another $SLEEP_TIME seconds"
+		fi
+		sleep $SLEEP_TIME
+		let COUNTER=COUNTER+1 
+	done
 fi
 
-COUNTER=0
-while [  $COUNTER -lt $NUM_RETRIES ]; do
-	if wget --spider --timeout=$TIMEOUT --tries=1 $1 &> /dev/null; then
-		touch $2/spider.success
-		echo "Try $COUNTER: '$1' is available"	> ./spider.success
-		exit 0
-	else
-		echo "Try $COUNTER: '$1' does not respond, wait another $SLEEP_TIME seconds"
-	fi
-	sleep $SLEEP_TIME
-	let COUNTER=COUNTER+1 
-done
-
 touch $2/spider.failed
 echo "Unable to connect to $1, exiting..." > spider.failed
 exit 0




More information about the jbpm-commits mailing list