Browse Source

Chore: copy wait_for_server from library

Get rid of duplicated countr

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Álvaro Brey 2 năm trước cách đây
mục cha
commit
0cb1cb0258
1 tập tin đã thay đổi với 3 bổ sung6 xóa
  1. 3 6
      scripts/wait_for_server.sh

+ 3 - 6
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"