diff --git a/.templates/00-global_var.sh b/.templates/00-global_var.sh index b6599440c..2b58c3d68 100755 --- a/.templates/00-global_var.sh +++ b/.templates/00-global_var.sh @@ -16,6 +16,11 @@ mapfile -t arr < <(jq -r 'keys[]' "${JSONSOURCE}") for KEYS in "${arr[@]}"; do # export key VALUE=$(jq ."$KEYS" "${JSONSOURCE}") + # Check if the value is an array + if [[ "$VALUE" == \[* ]]; then + bashio::log.warning "$VALUE is an array, skipping" + else + # Continue for single values VALUE="${VALUE//[\"\']/}" line="${KEYS}='${VALUE}'" # Check if secret @@ -59,7 +64,7 @@ for KEYS in "${arr[@]}"; do # For s6 if [ -d /var/run/s6/container_environment ]; then printf "%s" "${VALUE}" > /var/run/s6/container_environment/"${KEYS}"; fi echo "export ${KEYS}='${VALUE}'" >> ~/.bashrc - + fi done ################ diff --git a/calibre/CHANGELOG.md b/calibre/CHANGELOG.md index 7a3c832f1..4716cd250 100644 --- a/calibre/CHANGELOG.md +++ b/calibre/CHANGELOG.md @@ -1,3 +1,4 @@ +- ⚠ MAJOR CHANGE : switch to the new config logic from homeassistant. Your configuration files will have migrated from /config/hassio_addons/calibre to a folder only accessible from my Filebrowser addon called /addon_configs/something-calibre. This avoids the addon to mess with your homeassistant configuration folder, and allows to backup the options. Migration of data, custom configs, and custom scripts 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/ https://github.com/alexbelgium/hassio-addons/issues/1154 ## 7.2.0 (16-12-2023) - Update to latest version from linuxserver/docker-calibre diff --git a/calibre/Dockerfile b/calibre/Dockerfile index 02a1d9aab..47512b7d6 100644 --- a/calibre/Dockerfile +++ b/calibre/Dockerfile @@ -34,12 +34,12 @@ VOLUME [ "/sys/fs/cgroup" ] # hadolint ignore=SC2015,DL4006,SC2013,SC2086 RUN \ # Change home folder location - usermod --home /config/addons_config/calibre abc \ + usermod --home /config abc \ && mkdir -p /opt/calibre # Global LSIO modifications ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" -ARG CONFIGLOCATION="/config/addons_config/calibre" +ARG CONFIGLOCATION="/config" RUN chmod 744 /ha_lsio.sh && if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh ################## diff --git a/calibre/config.json b/calibre/config.json index c291b447f..4201b1280 100644 --- a/calibre/config.json +++ b/calibre/config.json @@ -57,9 +57,9 @@ "/dev/nvme2" ], "environment": { - "CALIBRE_CONFIG_DIRECTORY": "/config/addons_config/calibre", - "FM_HOME": "/config/addons_config/calibre", - "HOME": "/config/addons_config/calibre", + "CALIBRE_CONFIG_DIRECTORY": "/config", + "FM_HOME": "/config", + "HOME": "/config", "PGID": "0", "PUID": "0", "START_DOCKER": "false", @@ -71,7 +71,8 @@ "map": [ "media:rw", "share:rw", - "config:rw", + "addon_config:rw", + "homeassistant_config:rw", "ssl" ], "name": "Calibre", diff --git a/calibre/rootfs/etc/cont-init.d/01-migrate.sh b/calibre/rootfs/etc/cont-init.d/01-migrate.sh new file mode 100644 index 000000000..52595c889 --- /dev/null +++ b/calibre/rootfs/etc/cont-init.d/01-migrate.sh @@ -0,0 +1,13 @@ +#!/usr/bin/with-contenv bashio +# shellcheck shell=bash +set -e + +#################### +# Migrate database # +#################### + +if [ -f /homeassistant/addons_config/calibre ]; then + echo "Moving database to new location /config" + cp -rnf /homeassistant/addons_config/calibre/* /config/ + rm -r /homeassistant/addons_config/calibre +fi diff --git a/calibre/rootfs/etc/cont-init.d/20-folders.sh b/calibre/rootfs/etc/cont-init.d/20-folders.sh index 8ee432613..a381ad829 100755 --- a/calibre/rootfs/etc/cont-init.d/20-folders.sh +++ b/calibre/rootfs/etc/cont-init.d/20-folders.sh @@ -12,7 +12,7 @@ LOCATION=$(bashio::config 'data_location') if [[ "$LOCATION" = "null" || -z "$LOCATION" ]]; then # Default location - LOCATION="/config/addons_config/calibre" + LOCATION="/config" else bashio::log.warning "Warning : a custom data location was selected, but the previous folder will NOT be copied. You need to do it manually" @@ -25,7 +25,7 @@ else done if [ -z "$LOCATIONOK" ]; then - LOCATION="/config/addons_config/calibre" + LOCATION="/config" bashio::log.fatal "Your data_location value can only be set in /share, /config or /data (internal to addon). It will be reset to the default location : $LOCATION" fi @@ -45,7 +45,7 @@ done # Correct home location for folders in /defaults /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d; do if [ -d "$folders" ]; then - sed -i "s|/config/addons_config/calibre|$LOCATION|g" $(find "$folders" -type f) &>/dev/null || true + sed -i "s|/config|$LOCATION|g" $(find "$folders" -type f) &>/dev/null || true fi done diff --git a/inadyn/config.json b/inadyn/config.json index c6df25611..483f41efc 100644 --- a/inadyn/config.json +++ b/inadyn/config.json @@ -108,5 +108,5 @@ "slug": "inadyn", "udev": true, "url": "https://github.com/alexbelgium/hassio-addons", - "version": "2.12.0" + "version": "2.12.0-2" } diff --git a/jellyfin/README.md b/jellyfin/README.md index c391fb21e..3fb1f6a5f 100644 --- a/jellyfin/README.md +++ b/jellyfin/README.md @@ -1,3 +1,4 @@ +## ⚠ Open Request : [✨ [REQUEST] Jellyfin discord bot (opened 2023-08-17)](https://github.com/alexbelgium/hassio-addons/issues/943) by [@matsob0123](https://github.com/matsob0123) ## ⚠ Open Request : [✨ [REQUEST] Jellyfish NAS: omit `/config/addons_config/jellyfin/data/metadata` from backup (opened 2023-10-25)](https://github.com/alexbelgium/hassio-addons/issues/1048) by [@bilogic](https://github.com/bilogic) # Home assistant add-on: jellyfin diff --git a/qbittorrent/README.md b/qbittorrent/README.md index de6072253..5dde08772 100644 --- a/qbittorrent/README.md +++ b/qbittorrent/README.md @@ -1,4 +1,3 @@ -## ⚠ Open Issue : [🐛 [qbittorrent] Unable to get qbitmanage to run (opened 2023-12-13)](https://github.com/alexbelgium/hassio-addons/issues/1131) by [@hacshacdgacs](https://github.com/hacshacdgacs) ## ⚠ Open Issue : [🐛 [Qbittorrent] Unable to connect to Qbittorrent from Sonarr or Prowlarr (opened 2024-01-02)](https://github.com/alexbelgium/hassio-addons/issues/1153) by [@JohnnyPicnic](https://github.com/JohnnyPicnic) # Home assistant add-on: qbittorrent