Use new config

This commit is contained in:
Alexandre
2025-02-10 17:32:00 +01:00
committed by GitHub
parent 56890aab37
commit 6655f3e40d
4 changed files with 16 additions and 16 deletions

View File

@@ -1,3 +1,4 @@
- New config logic, files migrated to /addon_configs/xxx-sabnzbd
## 4.4.1 (21-12-2024) ## 4.4.1 (21-12-2024)
- Update to latest version from linuxserver/docker-sabnzbd (changelog : https://github.com/linuxserver/docker-sabnzbd/releases) - Update to latest version from linuxserver/docker-sabnzbd (changelog : https://github.com/linuxserver/docker-sabnzbd/releases)

View File

@@ -29,7 +29,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
# Global LSIO modifications # Global LSIO modifications
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh" 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 RUN chmod 744 /ha_lsio.sh && if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh
################## ##################

View File

@@ -72,7 +72,8 @@
"ingress_entry": "sabnzbd", "ingress_entry": "sabnzbd",
"init": false, "init": false,
"map": [ "map": [
"config:rw", "addon_config:rw",
"homeassistant_config:rw",
"share:rw", "share:rw",
"media:rw" "media:rw"
], ],
@@ -106,6 +107,6 @@
"slug": "sabnzbd", "slug": "sabnzbd",
"udev": true, "udev": true,
"url": "https://github.com/alexbelgium/hassio-addons", "url": "https://github.com/alexbelgium/hassio-addons",
"version": "4.4.1", "version": "4.4.1-2",
"webui": "http://[HOST]:[PORT:8080]" "webui": "http://[HOST]:[PORT:8080]"
} }

View File

@@ -4,17 +4,15 @@ set -e
slug=sabnzbd slug=sabnzbd
if [ ! -d /config/addons_config/$slug ]; then if [ -d "/homeassistant/addons_config/$slug" ]; then
echo "Migrating /homeassistant/addons_config/$slug to /addon_configs/xxx-$slug"
if [ -d /config/$slug ]; then cp -rnf /homeassistant/addons_config/"$slug"/* /config/
echo "Moving to new location /config/addons_config/$slug" mv /homeassistant/addons_config/"$slug" /homeassistant/addons_config/"$slug"_migrated
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
fi 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/*