mirror of
https://github.com/nextcloud/android.git
synced 2024-12-18 15:01:57 +03:00
d0f3a00637
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
23 lines
482 B
Bash
Executable file
23 lines
482 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
status=""
|
|
counter=0
|
|
checkcounter=0
|
|
|
|
until [[ $status = "false" ]]; do
|
|
status=$(curl 2>/dev/null "http://$1/status.php" | jq .maintenance)
|
|
echo "($checkcounter) $status"
|
|
|
|
if [[ "$status" =~ "false" || "$status" = "" ]]; then
|
|
let "counter += 1"
|
|
if [[ $counter -gt 50 ]]; then
|
|
echo "Failed to wait for server"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
let "checkcounter += 1"
|
|
sleep 10
|
|
done
|
|
|
|
echo "($checkcounter) Done"
|