feat(fireflyiii_fints_importer): store configurations in addon_config

Map app_config instead of config and keep configurations in
/config/configurations (a subfolder, because the app lists every file
in its configurations folder and 01-custom_script.sh places the
autoscript in /config). 00-migrate_files.sh moves the old
/homeassistant/addons_config/fireflyiii_fints_importer contents there
once, dropping the self-link from #3091, and moves the autoscript, as
free_games_claimer and nextcloud do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
alexbelgium
2026-09-28 08:33:04 +02:00
parent 43c07e91e4
commit b95ec40c99
6 changed files with 29 additions and 11 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -2,7 +2,7 @@
# shellcheck shell=bash
set -e
CONFIGSOURCE="/config/addons_config/fireflyiii_fints_importer"
CONFIGSOURCE="/config/configurations"
#################
# CONFIG IMPORT #