diff --git a/entrypoint.sh b/entrypoint.sh index daf7280..4b1cdd2 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -18,7 +18,7 @@ PRIMARY_TAGS='["navidrome","web","traefik.enable=true","urlprefix-/navidrome","t # Check if this node is the LiteFS Primary # LiteFS 0.5 status API returns a flat object: {"isPrimary": true, ...} check_primary() { - local status=$(curl -s http://localhost:20202/status || echo "{}") + local status=$(curl -s http://localhost:20202/info || echo "{}") local is_primary=$(echo "$status" | jq -r 'if type == "object" then (.isPrimary // false) else false end' 2>/dev/null || echo "false") if [ "$is_primary" = "true" ]; then @@ -33,7 +33,7 @@ wait_for_litefs() { local timeout=60 local count=0 while [ $count -lt $timeout ]; do - local status=$(curl -s http://localhost:20202/status || echo "null") + local status=$(curl -s http://localhost:20202/info || echo "null") local is_primary_val=$(echo "$status" | jq -r 'if type == "object" then (.isPrimary // "null") else "null" end' 2>/dev/null || echo "null") if [ "$is_primary_val" != "null" ]; then