Skip to content

Commit

Permalink
Update 32-nginx_ingress.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbelgium authored Nov 1, 2023
1 parent 496f1e3 commit efd24c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sonarr/rootfs/etc/cont-init.d/32-nginx_ingress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ CONFIG_LOCATION=/config/addons_config/"$slug"/config.xml
if [ -f "$CONFIG_LOCATION" ]; then
# Set UrlBase
if ! bashio::config.true "ingress_disabled"; then
bashio::log.warning "---------------------------"
bashio::log.info "Disabling ingress and enabling authentification"
bashio::log.warning "---------------------------"
sed -i "/UrlBase/d" "$CONFIG_LOCATION"
sed -i "/<Config>/a <UrlBase>$slug<\/UrlBase>" "$CONFIG_LOCATION"
sed -i "/<AuthenticationMethod>external</AuthenticationMethod>/d" "$CONFIG_LOCATION"
else
bashio::log.info "Ingress is enabled, authentification will be disabled and should be managed through HA itself"
bashio::log.warning "---------------------------"
bashio::log.warning "Ingress is enabled, authentification will be disabled and should be managed through HA itself. If you need authentification, please disable ingress in addon options"
bashio::log.warning "---------------------------"
# Disable local auth
sed -i "/AuthenticationType/d" "$CONFIG_LOCATION"
sed -i "2a <AuthenticationType>DisabledForLocalAddresses</AuthenticationType>" "$CONFIG_LOCATION"
Expand Down

0 comments on commit efd24c7

Please sign in to comment.