mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-04 16:15:12 +02:00
Detect config type
https://github.com/alexbelgium/hassio-addons/issues/690
This commit is contained in:
@@ -12,7 +12,7 @@ CONFIG_LOCATION=/config/addons_config/readarr/config.xml
|
|||||||
if bashio::config.has_value 'CONFIG_LOCATION'; then
|
if bashio::config.has_value 'CONFIG_LOCATION'; then
|
||||||
CONFIG_LOCATION="$(bashio::config 'CONFIG_LOCATION')"
|
CONFIG_LOCATION="$(bashio::config 'CONFIG_LOCATION')"
|
||||||
# Modify if it is a base directory
|
# Modify if it is a base directory
|
||||||
if [ -f "$CONFIG_LOCATION" ]; then CONFIG_LOCATION="$(dirname $CONFIG_LOCATION)/config.xml"; fi
|
if [[ "$CONFIG_LOCATION" == *.* ]]; then CONFIG_LOCATION="$(dirname $CONFIG_LOCATION)/config.xml"; fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep -q "<UrlBase>/readarr</UrlBase>" "$CONFIG_LOCATION"; then
|
if ! grep -q "<UrlBase>/readarr</UrlBase>" "$CONFIG_LOCATION"; then
|
||||||
|
|||||||
Reference in New Issue
Block a user