diff --git a/unpackerr/CHANGELOG.md b/unpackerr/CHANGELOG.md index 97738cba7..22096ebdf 100644 --- a/unpackerr/CHANGELOG.md +++ b/unpackerr/CHANGELOG.md @@ -1,4 +1,6 @@ +- ⚠ MAJOR CHANGE : switch to the new config logic from homeassistant. Your configuration files will have migrated from /config to a folder only accessible from my Filebrowser addon called /addon_configs/db21ed7f_unpackerr. 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/ + ## testing-e916f00-9-linux-arm64-2023-09-17 (2023-09-17) - Update to latest version from hotio/unpackerr diff --git a/unpackerr/config.json b/unpackerr/config.json index 6250786b7..16054c32c 100644 --- a/unpackerr/config.json +++ b/unpackerr/config.json @@ -60,9 +60,10 @@ "image": "ghcr.io/alexbelgium/unpackerr-{arch}", "init": false, "map": [ - "config:rw", - "share:rw", "media:rw", + "addon_config:rw", + "homeassistant_config:rw", + "share:rw", "ssl" ], "name": "Unpackerr", @@ -85,7 +86,8 @@ "extraction_path": "str?", "localdisks": "str?", "networkdisks": "str?", - "watch_path": "str?" + "watch_path": "str?", + "TZ": "str?" }, "slug": "unpackerr", "udev": true, diff --git a/unpackerr/rootfs/etc/cont-init.d/01-migration.sh b/unpackerr/rootfs/etc/cont-init.d/01-migration.sh new file mode 100644 index 000000000..39e0736e6 --- /dev/null +++ b/unpackerr/rootfs/etc/cont-init.d/01-migration.sh @@ -0,0 +1,6 @@ +#!/usr/bin/bashio + +if [ -f /homeassistant/unpackerr.conf ]; then + bashio::log.warning "Migrating unpackerr.conf to /addons_configs/$HOSTNAME/unpackerr.conf" + mv /homeassistant/unpackerr.conf /config/unpackerr.conf +fi \ No newline at end of file diff --git a/unpackerr/rootfs/etc/cont-init.d/99-config.sh b/unpackerr/rootfs/etc/cont-init.d/99-config.sh index 8a9ea63ef..705ba0a97 100755 --- a/unpackerr/rootfs/etc/cont-init.d/99-config.sh +++ b/unpackerr/rootfs/etc/cont-init.d/99-config.sh @@ -1,11 +1,14 @@ #!/usr/bin/bashio # Set user -if bashio::config.has_value 'PUID'; then PUID="$(bashio::config 'PUID')"; fi -if bashio::config.has_value 'PGID'; then PGID="$(bashio::config 'PGID')"; fi +if bashio::config.has_value 'PUID'; then export PUID="$(bashio::config 'PUID')"; fi +if bashio::config.has_value 'PGID'; then export PGID="$(bashio::config 'PGID')"; fi +if bashio::config.has_value 'TZ'; then export TZ="$(bashio::config 'TZ')"; fi # Enable watch folder if bashio::config.has_value "watch_path"; then + # Info + bashio::log.info "Watch path is $(bashio::config 'watch_path'), creating folder and setting permission" # Enables folders sed -i "/[[folder]]/c [[folder]]" /config/unpackerr.conf # Set downloads path @@ -20,6 +23,8 @@ fi # Enable extraction folder if bashio::config.has_value "extraction_path"; then + # Info + bashio::log.info "Extraction path is $(bashio::config 'extraction_path'), creating folder and setting permission" # Enables folders sed -i "/[[folder]]/c [[folder]]" /config/unpackerr.conf # Set extraction path diff --git a/unpackerr/updater.json b/unpackerr/updater.json index 062f7791b..961e830fb 100644 --- a/unpackerr/updater.json +++ b/unpackerr/updater.json @@ -4,7 +4,7 @@ "last_update": "2023-09-17", "repository": "alexbelgium/hassio-addons", "slug": "unpackerr", - "source": "dockerhub", - "upstream_repo": "hotio/unpackerr", + "source": "github", + "upstream_repo": "Unpackerr/unpackerr", "upstream_version": "testing-e916f00-9-linux-arm64-2023-09-17" }