Ver Fonte

Chore: copy wait_for_server from library

Get rid of duplicated countr

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Álvaro Brey há 2 anos atrás
pai
commit
0cb1cb0258
1 ficheiros alterados com 3 adições e 6 exclusões
  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"