Enable use of custom ports

#214 - This should resolve this request!
This commit is contained in:
RandomNinjaAtk 2024-03-22 17:57:11 -04:00 committed by GitHub
parent fb7ced4910
commit c0ac258d5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -36,13 +36,15 @@ verifyApiAccess () {
do
arrApiTest=""
arrApiVersion=""
if [ "$arrPort" == "8989" ] || [ "$arrPort" == "7878" ]; then
if [ -z "$arrApiTest" ]; then
arrApiVersion="v3"
elif [ "$arrPort" == "8686" ] || [ "$arrPort" == "8787" ]; then
arrApiVersion="v1"
arrApiTest="$(curl -s "$arrUrl/api/$arrApiVersion/system/status?apikey=$arrApiKey" | jq -r .instanceName)"
fi
arrApiTest=$(curl -s "$arrUrl/api/$arrApiVersion/system/status?apikey=$arrApiKey" | jq -r .instanceName)
if [ "$arrApiTest" == "$arrName" ]; then
if [ -z "$arrApiTest" ]; then
arrApiVersion="v1"
arrApiTest="$(curl -s "$arrUrl/api/$arrApiVersion/system/status?apikey=$arrApiKey" | jq -r .instanceName)"
fi
if [ ! -z "$arrApiTest" ]; then
break
else
log "$arrName is not ready, sleeping until valid response..."