parent
fb7ced4910
commit
c0ac258d5b
1 changed files with 7 additions and 5 deletions
|
@ -36,13 +36,15 @@ verifyApiAccess () {
|
||||||
do
|
do
|
||||||
arrApiTest=""
|
arrApiTest=""
|
||||||
arrApiVersion=""
|
arrApiVersion=""
|
||||||
if [ "$arrPort" == "8989" ] || [ "$arrPort" == "7878" ]; then
|
if [ -z "$arrApiTest" ]; then
|
||||||
arrApiVersion="v3"
|
arrApiVersion="v3"
|
||||||
elif [ "$arrPort" == "8686" ] || [ "$arrPort" == "8787" ]; then
|
arrApiTest="$(curl -s "$arrUrl/api/$arrApiVersion/system/status?apikey=$arrApiKey" | jq -r .instanceName)"
|
||||||
arrApiVersion="v1"
|
|
||||||
fi
|
fi
|
||||||
arrApiTest=$(curl -s "$arrUrl/api/$arrApiVersion/system/status?apikey=$arrApiKey" | jq -r .instanceName)
|
if [ -z "$arrApiTest" ]; then
|
||||||
if [ "$arrApiTest" == "$arrName" ]; then
|
arrApiVersion="v1"
|
||||||
|
arrApiTest="$(curl -s "$arrUrl/api/$arrApiVersion/system/status?apikey=$arrApiKey" | jq -r .instanceName)"
|
||||||
|
fi
|
||||||
|
if [ ! -z "$arrApiTest" ]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
log "$arrName is not ready, sleeping until valid response..."
|
log "$arrName is not ready, sleeping until valid response..."
|
||||||
|
|
Loading…
Reference in a new issue