瀏覽代碼

Chore: copy wait_for_server from library

Get rid of duplicated countr

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Álvaro Brey 2 年之前
父節點
當前提交
0cb1cb0258
共有 1 個文件被更改,包括 3 次插入6 次删除
  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"