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

@@ -1,3 +1,6 @@
## 0.4.18-2 (08-01-2026)
- Remove CONFIG_LOCATION option now that config lives under /addon_configs by default
## 0.4.18-1 (08-01-2026) ## 0.4.18-1 (08-01-2026)
- ⚠ MAJOR CHANGE : switch to the new config logic from homeassistant. Your configuration files will have migrated from /config/addons_config/readarr to a folder only accessible from my Filebrowser addon called /addon_configs/xxx-readarr_nas. This avoids the addon to mess with your homeassistant configuration folder, and allows to backup the options. Migration of data should be automatic. Please be sure to update all your links however ! For more information, see here : https://developers.home-assistant.io/blog/2023/11/06/public-addon-config/ - ⚠ MAJOR CHANGE : switch to the new config logic from homeassistant. Your configuration files will have migrated from /config/addons_config/readarr to a folder only accessible from my Filebrowser addon called /addon_configs/xxx-readarr_nas. This avoids the addon to mess with your homeassistant configuration folder, and allows to backup the options. Migration of data should be automatic. Please be sure to update all your links however ! For more information, see here : https://developers.home-assistant.io/blog/2023/11/06/public-addon-config/

View File

@@ -61,7 +61,6 @@ Configurations can be done through the app webUI, except for the following optio
| `PGID` | int | `0` | Group ID for file permissions | | `PGID` | int | `0` | Group ID for file permissions |
| `PUID` | int | `0` | User ID for file permissions | | `PUID` | int | `0` | User ID for file permissions |
| `TZ` | str | | Timezone (e.g., `Europe/London`) | | `TZ` | str | | Timezone (e.g., `Europe/London`) |
| `CONFIG_LOCATION` | str | `/config` | Path where Readarr config is stored |
| `connection_mode` | list | `ingress_noauth` | Connection mode (ingress_noauth/noingress_auth/ingress_auth) | | `connection_mode` | list | `ingress_noauth` | Connection mode (ingress_noauth/noingress_auth/ingress_auth) |
| `localdisks` | str | | Local drives to mount (e.g., `sda1,sdb1,MYNAS`) | | `localdisks` | str | | Local drives to mount (e.g., `sda1,sdb1,MYNAS`) |
| `networkdisks` | str | | SMB shares to mount (e.g., `//SERVER/SHARE`) | | `networkdisks` | str | | SMB shares to mount (e.g., `//SERVER/SHARE`) |
@@ -81,7 +80,6 @@ Configurations can be done through the app webUI, except for the following optio
PGID: 0 PGID: 0
PUID: 0 PUID: 0
TZ: "Europe/London" TZ: "Europe/London"
CONFIG_LOCATION: "/config"
connection_mode: "ingress_noauth" connection_mode: "ingress_noauth"
localdisks: "sda1,sdb1" localdisks: "sda1,sdb1"
networkdisks: "//192.168.1.100/books,//nas.local/ebooks" networkdisks: "//192.168.1.100/books,//nas.local/ebooks"
@@ -121,4 +119,3 @@ Create an issue on github
![illustration](https://readarr.com/img/slider/artistdetails.png) ![illustration](https://readarr.com/img/slider/artistdetails.png)
[repository]: https://github.com/alexbelgium/hassio-addons [repository]: https://github.com/alexbelgium/hassio-addons

View File

@@ -79,7 +79,6 @@ map:
name: Readarr name: Readarr
options: options:
env_vars: [] env_vars: []
CONFIG_LOCATION: /config
PGID: 0 PGID: 0
PUID: 0 PUID: 0
connection_mode: ingress_noauth connection_mode: ingress_noauth
@@ -96,7 +95,6 @@ schema:
env_vars: env_vars:
- name: match(^[A-Za-z0-9_]+$) - name: match(^[A-Za-z0-9_]+$)
value: str? value: str?
CONFIG_LOCATION: str
PGID: int PGID: int
PUID: int PUID: int
TZ: str? TZ: str?
@@ -109,4 +107,4 @@ schema:
slug: readarr_nas slug: readarr_nas
udev: true udev: true
url: https://github.com/alexbelgium/hassio-addons/tree/master/readarr url: https://github.com/alexbelgium/hassio-addons/tree/master/readarr
version: "0.4.18-1" version: "0.4.18-2"

View File

@@ -2,21 +2,8 @@
# shellcheck shell=bash # shellcheck shell=bash
set -e set -e
if bashio::config.has_value 'CONFIG_LOCATION'; then CONFIG_LOCATION="/config"
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
bashio::log.info "Config stored in $CONFIG_LOCATION" bashio::log.info "Config stored in $CONFIG_LOCATION"
mkdir -p "$CONFIG_LOCATION" mkdir -p "$CONFIG_LOCATION"
chown -R "$PUID:$PGID" "$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 # Wait for transmission to become available
bashio::net.wait_for "$port" localhost 900 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 # Delete external
if grep -q "external" "$CONFIG_LOCATION"; then if grep -q "external" "$CONFIG_LOCATION"; then
bashio::log.warning "external is set, restarting" bashio::log.warning "external is set, restarting"