set baseURL to 127.0.0.1 instead of localhost
This commit is contained in:
@@ -338,12 +338,12 @@ let
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
API_KEY=$(${grep} -oP '(?<=<ApiKey>)[^<]+' "$CONFIG_XML")
|
API_KEY=$(${grep} -oP '(?<=<ApiKey>)[^<]+' "$CONFIG_XML")
|
||||||
BASE_URL="http://localhost:${builtins.toString inst.port}/api/${inst.apiVersion}"
|
BASE_URL="http://127.0.0.1:${builtins.toString inst.port}/api/${inst.apiVersion}"
|
||||||
|
|
||||||
# Wait for API to become available
|
# Wait for API to become available
|
||||||
echo "Waiting for ${name} API..."
|
echo "Waiting for ${name} API..."
|
||||||
for i in $(seq 1 90); do
|
for i in $(seq 1 90); do
|
||||||
if ${curl} -sf "$BASE_URL/system/status" -H "X-Api-Key: $API_KEY" > /dev/null 2>&1; then
|
if ${curl} -sf --connect-timeout 5 "$BASE_URL/system/status" -H "X-Api-Key: $API_KEY" > /dev/null 2>&1; then
|
||||||
echo "${name} API is ready"
|
echo "${name} API is ready"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
@@ -405,12 +405,12 @@ let
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
API_KEY=$(${awk} '/^auth:/{f=1} f && /apikey:/{gsub(/.*apikey: /, ""); print; exit}' "$CONFIG_YAML")
|
API_KEY=$(${awk} '/^auth:/{f=1} f && /apikey:/{gsub(/.*apikey: /, ""); print; exit}' "$CONFIG_YAML")
|
||||||
BASE_URL="http://localhost:${builtins.toString bazarrCfg.port}"
|
BASE_URL="http://127.0.0.1:${builtins.toString bazarrCfg.port}"
|
||||||
|
|
||||||
# Wait for API to become available
|
# Wait for API to become available
|
||||||
echo "Waiting for Bazarr API..."
|
echo "Waiting for Bazarr API..."
|
||||||
for i in $(seq 1 90); do
|
for i in $(seq 1 90); do
|
||||||
if ${curl} -sf "$BASE_URL/api/system/status" -H "X-API-KEY: $API_KEY" > /dev/null 2>&1; then
|
if ${curl} -sf --connect-timeout 5 "$BASE_URL/api/system/status" -H "X-API-KEY: $API_KEY" > /dev/null 2>&1; then
|
||||||
echo "Bazarr API is ready"
|
echo "Bazarr API is ready"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user