Remove Readarr CONFIG_LOCATION option

This commit is contained in:
Alexandre
2026-01-08 13:44:21 +01:00
parent 3979acc25f
commit 2c2d239eba
5 changed files with 5 additions and 27 deletions

View File

@@ -2,21 +2,8 @@
# shellcheck shell=bash
set -e
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")"; fi
else
CONFIG_LOCATION="/config"
fi
CONFIG_LOCATION="/config"
bashio::log.info "Config stored in $CONFIG_LOCATION"
mkdir -p "$CONFIG_LOCATION"
chown -R "$PUID:$PGID" "$CONFIG_LOCATION"
if [ "$CONFIG_LOCATION" != "/config" ]; then
# shellcheck disable=SC2013
for file in $(grep -sril "/config" /etc /defaults); do
sed -i "s|/config|$CONFIG_LOCATION|g" "$file"
done
fi

View File

@@ -11,13 +11,6 @@ CONFIG_LOCATION=/config/config.xml
# Wait for transmission to become available
bashio::net.wait_for "$port" localhost 900
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)"; fi
CONFIG_LOCATION="$CONFIG_LOCATION"/config.xml
fi
# Delete external
if grep -q "external" "$CONFIG_LOCATION"; then
bashio::log.warning "external is set, restarting"