Update run

This commit is contained in:
Alexandre
2023-02-05 06:58:39 +01:00
committed by GitHub
parent a9d8f476a7
commit 32e0218e56

View File

@@ -10,7 +10,8 @@ CONFIG_LOCATION=/config/addons_config/sonarr/config.xml
if bashio::config.has_value 'CONFIG_LOCATION'; then
CONFIG_LOCATION="$(bashio::config 'CONFIG_LOCATION')"
# Modify if it is a base directory
if [[ "$CONFIG_LOCATION" == *.* ]]; then CONFIG_LOCATION="$(dirname $CONFIG_LOCATION)/config.xml"; fi
if [[ "$CONFIG_LOCATION" == *.* ]]; then CONFIG_LOCATION="$(dirname $CONFIG_LOCATION)"; fi
CONFIG_LOCATION="$CONFIG_LOCATION"/config.xml
fi
if ! grep -q "<UrlBase>/sonarr</UrlBase>" "$CONFIG_LOCATION"; then