Skip to content

Commit

Permalink
Merge pull request #478 from nobodyiam/fix-start-up-sh
Browse files Browse the repository at this point in the history
add max-time option to avoid unexpected hang
  • Loading branch information
nobodyiam authored Dec 6, 2016
2 parents dbf1eb4 + d22093f commit 2219b0a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apollo-adminservice/src/main/scripts/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ declare -i max_counter=16 # 16*5=80s
declare -i total_time=0

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
printf "." >> $STARTUP_LOG
counter+=1
Expand Down
2 changes: 1 addition & 1 deletion apollo-configservice/src/main/scripts/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ declare -i max_counter=16 # 16*5=80s
declare -i total_time=0

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
printf "." >> $STARTUP_LOG
counter+=1
Expand Down
2 changes: 1 addition & 1 deletion apollo-portal/src/main/scripts/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ declare -i max_counter=16 # 16*5=80s
declare -i total_time=0

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
printf "." >> $STARTUP_LOG
counter+=1
Expand Down

0 comments on commit 2219b0a

Please sign in to comment.