From e6d8c926c390e0621f6d0264370bc7b2394df26f Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 20 Apr 2026 09:43:11 +0200 Subject: [PATCH] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- bazarr/rootfs/etc/services.d/nginx/run | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bazarr/rootfs/etc/services.d/nginx/run b/bazarr/rootfs/etc/services.d/nginx/run index d5bdc999a..94c657e39 100644 --- a/bazarr/rootfs/etc/services.d/nginx/run +++ b/bazarr/rootfs/etc/services.d/nginx/run @@ -13,10 +13,14 @@ bashio::net.wait_for "$port" localhost 900 # Set base_url if [ -f "$CONFIG_LOCATION" ]; then - if ! grep -q "base_url.*$slug" "$CONFIG_LOCATION" && ! bashio::config.true "ingress_disabled"; then - bashio::log.warning "BaseUrl not set properly, restarting" - sed -i "s/ base_url:.*/ base_url: $slug/" "$CONFIG_LOCATION" - bashio::addon.restart + if ! bashio::config.true "ingress_disabled"; then + if ! bashio::config.has_value "connection_mode" || [ "$(bashio::config 'connection_mode')" != "noingress_auth" ]; then + if ! grep -q "base_url.*$slug" "$CONFIG_LOCATION"; then + bashio::log.warning "BaseUrl not set properly, restarting" + sed -i "s/ base_url:.*/ base_url: $slug/" "$CONFIG_LOCATION" + bashio::addon.restart + fi + fi fi fi