diff --git a/sabnzbd/CHANGELOG.md b/sabnzbd/CHANGELOG.md index 7f9698a7b..7e22f4824 100644 --- a/sabnzbd/CHANGELOG.md +++ b/sabnzbd/CHANGELOG.md @@ -1,3 +1,4 @@ +- New config logic, files migrated to /addon_configs/xxx-sabnzbd ## 4.4.1 (21-12-2024) - Update to latest version from linuxserver/docker-sabnzbd (changelog : https://github.com/linuxserver/docker-sabnzbd/releases) diff --git a/sabnzbd/Dockerfile b/sabnzbd/Dockerfile index 7ef9501fb..a49daa756 100644 --- a/sabnzbd/Dockerfile +++ b/sabnzbd/Dockerfile @@ -29,7 +29,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \ # Global LSIO modifications ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" -ARG CONFIGLOCATION="/config/addons_config/sabnzbd" +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/sabnzbd/config.json b/sabnzbd/config.json index 86bbdfbce..1adb1559f 100644 --- a/sabnzbd/config.json +++ b/sabnzbd/config.json @@ -72,7 +72,8 @@ "ingress_entry": "sabnzbd", "init": false, "map": [ - "config:rw", + "addon_config:rw", + "homeassistant_config:rw", "share:rw", "media:rw" ], @@ -106,6 +107,6 @@ "slug": "sabnzbd", "udev": true, "url": "https://github.com/alexbelgium/hassio-addons", - "version": "4.4.1", + "version": "4.4.1-2", "webui": "http://[HOST]:[PORT:8080]" } diff --git a/sabnzbd/rootfs/etc/cont-init.d/20-folders.sh b/sabnzbd/rootfs/etc/cont-init.d/20-folders.sh index 3fc62e752..dc407754d 100755 --- a/sabnzbd/rootfs/etc/cont-init.d/20-folders.sh +++ b/sabnzbd/rootfs/etc/cont-init.d/20-folders.sh @@ -4,17 +4,15 @@ set -e slug=sabnzbd -if [ ! -d /config/addons_config/$slug ]; then - - if [ -d /config/$slug ]; then - echo "Moving to new location /config/addons_config/$slug" - mkdir -p /config/addons_config/$slug - chmod 777 /config/addons_config/$slug - mv /config/$slug/* /config/addons_config/$slug/ - rm -r /config/$slug - fi - - echo "Creating /config/addons_config/$slug" - mkdir -p /config/addons_config/$slug - chmod 777 /config/addons_config/$slug +if [ -d "/homeassistant/addons_config/$slug" ]; then + echo "Migrating /homeassistant/addons_config/$slug to /addon_configs/xxx-$slug" + cp -rnf /homeassistant/addons_config/"$slug"/* /config/ + mv /homeassistant/addons_config/"$slug" /homeassistant/addons_config/"$slug"_migrated fi + +if [ -f "/homeassistant/addons_autoscripts/$slug.sh" ]; then + bashio::log.warning "Migrating autoscript" + mv /homeassistant/addons_autoscripts/$slug.sh /config/ +fi + +chmod 777 /config/*