From 0cb1cb0258af969afe29dd4e2e30e1b0666ef6b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Brey?= Date: Tue, 17 Jan 2023 09:58:06 +0100 Subject: [PATCH] Chore: copy wait_for_server from library MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Get rid of duplicated countr Signed-off-by: Álvaro Brey --- scripts/wait_for_server.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/wait_for_server.sh b/scripts/wait_for_server.sh index 76e6a73973..5821c71d6e 100755 --- a/scripts/wait_for_server.sh +++ b/scripts/wait_for_server.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash -status="" counter=0 -checkcounter=0 +status="" until [[ $status = "false" ]]; do status=$(curl 2>/dev/null "http://$1/status.php" | jq .maintenance) - echo "($checkcounter) $status" + + echo "($counter) $status" if [[ "$status" =~ "false" || "$status" = "" ]]; then let "counter += 1" @@ -16,8 +16,5 @@ until [[ $status = "false" ]]; do fi fi - let "checkcounter += 1" sleep 10 done - -echo "($checkcounter) Done"