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:
Álvaro Brey 2023-01-17 09:58:06 +01:00
parent 5e5500585c
commit 0cb1cb0258
No known key found for this signature in database
GPG key ID: 2585783189A62105

View file

@ -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"