mirror of
https://github.com/nextcloud/android.git
synced 2024-11-21 20:55:31 +03:00
Chore: copy wait_for_server from library
Get rid of duplicated countr Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
parent
5e5500585c
commit
0cb1cb0258
1 changed files with 3 additions and 6 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue