nextcloud-android/scripts/wait_for_server.sh
tobiasKaminsky c2750aabda
Add ui test for list shares
add test user to drone
switch back to master
use "waitForIdleSync" instead of sleep

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2020-02-11 08:57:09 +01:00

18 lines
375 B
Bash
Executable file

#!/usr/bin/env bash
counter=0
status=""
until [[ $status = "false" ]]; do
status=$(curl 2>/dev/null "http://$1/status.php" | jq .maintenance)
if [[ "$status" =~ "false" || "$status" = "" ]]; then
let "counter += 1"
if [[ $counter -gt 10 ]]; then
echo "Failed to wait for server"
exit 1
fi
fi
sleep 10
done