set baseURL to 127.0.0.1 instead of localhost
This commit is contained in:
@@ -338,12 +338,12 @@ let
|
||||
fi
|
||||
|
||||
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
|
||||
echo "Waiting for ${name} API..."
|
||||
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"
|
||||
break
|
||||
fi
|
||||
@@ -405,12 +405,12 @@ let
|
||||
fi
|
||||
|
||||
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
|
||||
echo "Waiting for Bazarr API..."
|
||||
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"
|
||||
break
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user