Skip to content

Commit

Permalink
fix: wget in alpine runs into an endless retry loop (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
gesellix authored Jan 9, 2023
1 parent b29602e commit b15c461
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wait-for
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ wait_for() {

while :; do
case "$PROTOCOL" in
tcp)
tcp)
nc -w 1 -z "$HOST" "$PORT" > /dev/null 2>&1
;;
http)
wget --timeout=1 -q "$HOST" -O /dev/null > /dev/null 2>&1
wget --timeout=1 --tries=1 -q "$HOST" -O /dev/null > /dev/null 2>&1
;;
*)
echoerr "Unknown protocol '$PROTOCOL'"
Expand All @@ -81,7 +81,7 @@ wait_for() {
esac

result=$?

if [ $result -eq 0 ] ; then
if [ $# -gt 7 ] ; then
for result in $(seq $(($# - 7))); do
Expand Down

0 comments on commit b15c461

Please sign in to comment.