diff --git a/fireflyiii_fints_importer/CHANGELOG.md b/fireflyiii_fints_importer/CHANGELOG.md index 43ae378f98..e77d2124fb 100644 --- a/fireflyiii_fints_importer/CHANGELOG.md +++ b/fireflyiii_fints_importer/CHANGELOG.md @@ -1,6 +1,7 @@ ## 1.3.0.8 (28-09-2026) -- Fix the configurations folder nesting inside itself on every restart, which made the web UI show `ConfigurationFactory.php` errors (#3091). The leftover self-referencing link is removed at startup, and the configurations are now linked only once, at `data/configurations`. +- Fix the configurations folder nesting inside itself on every restart, which made the web UI show `ConfigurationFactory.php` errors (#3091). +- Configurations now live in the add-on config folder, `/addon_configs/xxx_fireflyiii_fints_importer/configurations`. Files in the previous location `/homeassistant/addons_config/fireflyiii_fints_importer` are moved there automatically on first start, and the old folder is marked with a `migrated` file. A custom `addons_autoscripts/fireflyiii-fints-importer.sh` is moved to the add-on config folder as well. ## 1.3.0.7 (23-09-2026) diff --git a/fireflyiii_fints_importer/README.md b/fireflyiii_fints_importer/README.md index f662270bef..3c6c3611dc 100644 --- a/fireflyiii_fints_importer/README.md +++ b/fireflyiii_fints_importer/README.md @@ -79,8 +79,10 @@ The `Updates` option allows you to schedule automatic imports: ### Configuration Storage -Bank configurations and import settings are stored in: -`/config/addons_config/fireflyiii_fints_importer/` +Bank configurations (`.json` files) and import settings are stored in the add-on config folder: +`/addon_configs/xxx_fireflyiii_fints_importer/configurations/` + +Files from the previous location `/config/addons_config/fireflyiii_fints_importer/` are moved there automatically on first start. For configuration file format, see: https://github.com/bnw/firefly-iii-fints-importer#storing-configurations diff --git a/fireflyiii_fints_importer/config.yaml b/fireflyiii_fints_importer/config.yaml index 8df422366d..b0cddf4775 100644 --- a/fireflyiii_fints_importer/config.yaml +++ b/fireflyiii_fints_importer/config.yaml @@ -70,7 +70,8 @@ environment: TRUSTED_PROXIES: "**" image: ghcr.io/alexbelgium/fireflyiii_fints_importer-{arch} map: - - config:rw + - app_config:rw + - homeassistant_config:rw - share:rw - ssl name: Firefly iii FinTS Importer diff --git a/fireflyiii_fints_importer/rootfs/etc/cont-init.d/00-migrate_files.sh b/fireflyiii_fints_importer/rootfs/etc/cont-init.d/00-migrate_files.sh new file mode 100755 index 0000000000..c6ffdfe1f5 --- /dev/null +++ b/fireflyiii_fints_importer/rootfs/etc/cont-init.d/00-migrate_files.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bashio +# shellcheck shell=bash +set -e + +# Migrate files for new config location +slug="fireflyiii_fints_importer" +if [ -d "/homeassistant/addons_config/$slug" ] && [ ! -f "/homeassistant/addons_config/$slug/migrated" ]; then + bashio::log.warning "Migrating configurations" + # Self-referencing link left by previous versions + if [ -L "/homeassistant/addons_config/$slug/$slug" ]; then rm "/homeassistant/addons_config/$slug/$slug"; fi + mkdir -p /config/configurations + mv "/homeassistant/addons_config/$slug"/* /config/configurations/ || true + echo "Migrated to internal config folder accessible at /addon_configs/xxx_$slug/configurations" > "/homeassistant/addons_config/$slug/migrated" +fi + +if [ -f "/homeassistant/addons_autoscripts/fireflyiii-fints-importer.sh" ]; then + bashio::log.warning "Migrating autoscript" + mv /homeassistant/addons_autoscripts/fireflyiii-fints-importer.sh /config/ || true +fi diff --git a/fireflyiii_fints_importer/rootfs/etc/cont-init.d/20-folders.sh b/fireflyiii_fints_importer/rootfs/etc/cont-init.d/20-folders.sh index d4d8bbb355..d53a79a979 100755 --- a/fireflyiii_fints_importer/rootfs/etc/cont-init.d/20-folders.sh +++ b/fireflyiii_fints_importer/rootfs/etc/cont-init.d/20-folders.sh @@ -2,16 +2,11 @@ # shellcheck shell=bash set -e -CONFIGSOURCE="/config/addons_config/fireflyiii_fints_importer" +CONFIGSOURCE="/config/configurations" # Create directory mkdir -p "$CONFIGSOURCE" -# Remove the self-referencing link created by previous versions -if [ -L "$CONFIGSOURCE/fireflyiii_fints_importer" ]; then - rm "$CONFIGSOURCE/fireflyiii_fints_importer" -fi - # The app reads data/configurations; -n replaces the link kept in /data instead of nesting a new one inside it ln -sfn "$CONFIGSOURCE" /data/configurations diff --git a/fireflyiii_fints_importer/rootfs/etc/cont-init.d/99-run.sh b/fireflyiii_fints_importer/rootfs/etc/cont-init.d/99-run.sh index 3bc0959550..9a3afb8ffa 100755 --- a/fireflyiii_fints_importer/rootfs/etc/cont-init.d/99-run.sh +++ b/fireflyiii_fints_importer/rootfs/etc/cont-init.d/99-run.sh @@ -2,7 +2,7 @@ # shellcheck shell=bash set -e -CONFIGSOURCE="/config/addons_config/fireflyiii_fints_importer" +CONFIGSOURCE="/config/configurations" ################# # CONFIG IMPORT #