Commit 2219b0a2 by Jason Song Committed by GitHub

Merge pull request #478 from nobodyiam/fix-start-up-sh

add max-time option to avoid unexpected hang
parents dbf1eb46 d22093f5
...@@ -66,7 +66,7 @@ declare -i max_counter=16 # 16*5=80s ...@@ -66,7 +66,7 @@ declare -i max_counter=16 # 16*5=80s
declare -i total_time=0 declare -i total_time=0
printf "Waiting for server startup" >> $STARTUP_LOG printf "Waiting for server startup" >> $STARTUP_LOG
until [[ (( counter -ge max_counter )) || "$(curl -X GET --silent --connect-timeout 1 --head $SERVER_URL | grep "Coyote")" != "" ]]; until [[ (( counter -ge max_counter )) || "$(curl -X GET --silent --connect-timeout 1 --max-time 2 --head $SERVER_URL | grep "Coyote")" != "" ]];
do do
printf "." >> $STARTUP_LOG printf "." >> $STARTUP_LOG
counter+=1 counter+=1
......
...@@ -66,7 +66,7 @@ declare -i max_counter=16 # 16*5=80s ...@@ -66,7 +66,7 @@ declare -i max_counter=16 # 16*5=80s
declare -i total_time=0 declare -i total_time=0
printf "Waiting for server startup" >> $STARTUP_LOG printf "Waiting for server startup" >> $STARTUP_LOG
until [[ (( counter -ge max_counter )) || "$(curl -X GET --silent --connect-timeout 1 --head $SERVER_URL | grep "Coyote")" != "" ]]; until [[ (( counter -ge max_counter )) || "$(curl -X GET --silent --connect-timeout 1 --max-time 2 --head $SERVER_URL | grep "Coyote")" != "" ]];
do do
printf "." >> $STARTUP_LOG printf "." >> $STARTUP_LOG
counter+=1 counter+=1
......
...@@ -66,7 +66,7 @@ declare -i max_counter=16 # 16*5=80s ...@@ -66,7 +66,7 @@ declare -i max_counter=16 # 16*5=80s
declare -i total_time=0 declare -i total_time=0
printf "Waiting for server startup" >> $STARTUP_LOG printf "Waiting for server startup" >> $STARTUP_LOG
until [[ (( counter -ge max_counter )) || "$(curl -X GET --silent --connect-timeout 1 --head $SERVER_URL | grep "Coyote")" != "" ]]; until [[ (( counter -ge max_counter )) || "$(curl -X GET --silent --connect-timeout 1 --max-time 2 --head $SERVER_URL | grep "Coyote")" != "" ]];
do do
printf "." >> $STARTUP_LOG printf "." >> $STARTUP_LOG
counter+=1 counter+=1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment