mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 10:21:02 +01:00
Remove Readarr CONFIG_LOCATION option
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user