From 14fa5e08c39e1735c64ed7fcbf166971073544b8 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 29 Nov 2025 19:48:58 +0100 Subject: [PATCH 1/8] Clarify migration preserves existing config data --- netalertx/CHANGELOG.md | 4 ++++ netalertx/README.md | 2 +- netalertx/config.yaml | 3 ++- netalertx/rootfs/etc/cont-init.d/99-run.sh | 23 +++++++++++++++------- netalertx/updater.json | 4 ++-- 5 files changed, 25 insertions(+), 11 deletions(-) diff --git a/netalertx/CHANGELOG.md b/netalertx/CHANGELOG.md index e2f25d77e..c34312419 100644 --- a/netalertx/CHANGELOG.md +++ b/netalertx/CHANGELOG.md @@ -2,6 +2,10 @@ - Added support for configuring extra environment variables via the `env_vars` add-on option alongside config.yaml. See https://github.com/alexbelgium/hassio-addons/wiki/Add-Environment-variables-to-your-Addon-2 for details. +## 25.10.1-2 (29-11-2025) +- Breaking change: data directories now use /data symlinks to /config; back up your installation before updating. Migration is supported only from version v25.5.24. +- Added tmpfs support for temporary storage. + ## 25.10.1 (04-10-2025) - Update to latest version from jokob-sk/NetAlertX (changelog : https://github.com/jokob-sk/NetAlertX/releases) diff --git a/netalertx/README.md b/netalertx/README.md index 7df696036..5ad9dad1f 100644 --- a/netalertx/README.md +++ b/netalertx/README.md @@ -49,7 +49,7 @@ comparison to installing any other Hass.io add-on. ## Configuration 1. If unavailable, the app generates a default `app.conf` and `app.db` file on the first run. -1. The preferred way is to manage the configuration via the Settings section in the UI, if UI is inaccessible you can modify `app.conf` in the `/app/config/` folder directly. +1. The preferred way is to manage the configuration via the Settings section in the UI, if UI is inaccessible you can modify `app.conf` in the `/data/config/` folder directly. 1. You have to specify which network(s) should be scanned. This is done by entering subnets that are accessible from the host. If you use the default `ARPSCAN` plugin, you have to specify at least one valid subnet and interface in the `SCAN_SUBNETS` setting. See the [documentation on How to set up multiple SUBNETS, VLANs and what are limitations](https://github.com/jokob-sk/NetAlertX/blob/main/docs/SUBNETS.md) and for troubleshooting and more advanced scenarios. 1. Read how to get devices into your [Home Assistant instance via the MQTT plugin](https://github.com/jokob-sk/NetAlertX/blob/main/docs/HOME_ASSISTANT.md) 1. Back everything up by following the [Backups documentation](https://github.com/jokob-sk/NetAlertX/blob/main/docs/BACKUPS.md). diff --git a/netalertx/config.yaml b/netalertx/config.yaml index 0cb3ae857..f13199959 100644 --- a/netalertx/config.yaml +++ b/netalertx/config.yaml @@ -43,6 +43,7 @@ schema: services: - mqtt:want slug: netalertx +tmpfs: true udev: true url: https://github.com/alexbelgium/hassio-addons -version: 25.10.1 +version: 25.10.1-2 diff --git a/netalertx/rootfs/etc/cont-init.d/99-run.sh b/netalertx/rootfs/etc/cont-init.d/99-run.sh index 9fe4153f0..697d8cea8 100755 --- a/netalertx/rootfs/etc/cont-init.d/99-run.sh +++ b/netalertx/rootfs/etc/cont-init.d/99-run.sh @@ -12,13 +12,22 @@ bashio::log.info "Update structure" echo "Creating symlinks" for folder in config db; do echo "Creating for $folder" - # Create symlinks - mkdir -p /config/"$folder" - if [ -d /app/"$folder" ] && [ "$(ls -A /app/"$folder")" ]; then - cp -rn /app/"$folder"/* /config/"$folder"/ - fi - rm -r /app/"$folder" - ln -sf /config/"$folder" /app/"$folder" + target="/config/${folder}" + mkdir -p "$target" + + # Migrate existing data from previous locations while avoiding self-copies + for legacy_path in "/app/${folder}" "/data/${folder}"; do + if [ -d "$legacy_path" ]; then + legacy_target="$(readlink -f "$legacy_path" || true)" + if [ "$legacy_target" != "$target" ] && [ "$(ls -A "$legacy_path")" ]; then + # -n prevents clobbering anything already present in /config + cp -rn "$legacy_path"/* "$target"/ + fi + fi + done + + rm -rf /data/"$folder" + ln -sf "$target" /data/"$folder" done sudo chown -R nginx:www-data /config/db/ diff --git a/netalertx/updater.json b/netalertx/updater.json index fce159912..da900f52a 100644 --- a/netalertx/updater.json +++ b/netalertx/updater.json @@ -1,8 +1,8 @@ { - "last_update": "04-10-2025", + "last_update": "29-11-2025", "repository": "alexbelgium/hassio-addons", "slug": "netalertx", "source": "github", "upstream_repo": "jokob-sk/NetAlertX", - "upstream_version": "25.10.1" + "upstream_version": "25.10.1-2" } From 277ad6126732ba9027d6cd6b6efe9e3ba50cb7d8 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 29 Nov 2025 19:53:05 +0100 Subject: [PATCH 2/8] Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- netalertx/rootfs/etc/cont-init.d/99-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netalertx/rootfs/etc/cont-init.d/99-run.sh b/netalertx/rootfs/etc/cont-init.d/99-run.sh index 697d8cea8..16df492e6 100755 --- a/netalertx/rootfs/etc/cont-init.d/99-run.sh +++ b/netalertx/rootfs/etc/cont-init.d/99-run.sh @@ -21,7 +21,7 @@ for folder in config db; do legacy_target="$(readlink -f "$legacy_path" || true)" if [ "$legacy_target" != "$target" ] && [ "$(ls -A "$legacy_path")" ]; then # -n prevents clobbering anything already present in /config - cp -rn "$legacy_path"/* "$target"/ + cp -rn "$legacy_path"/. "$target"/ fi fi done From a3bd29b316220b0c0904eef5aa94891ea98b0603 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 29 Nov 2025 19:56:22 +0100 Subject: [PATCH 3/8] Update 99-run.sh --- netalertx/rootfs/etc/cont-init.d/99-run.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/netalertx/rootfs/etc/cont-init.d/99-run.sh b/netalertx/rootfs/etc/cont-init.d/99-run.sh index 16df492e6..2ca2bd706 100755 --- a/netalertx/rootfs/etc/cont-init.d/99-run.sh +++ b/netalertx/rootfs/etc/cont-init.d/99-run.sh @@ -18,16 +18,12 @@ for folder in config db; do # Migrate existing data from previous locations while avoiding self-copies for legacy_path in "/app/${folder}" "/data/${folder}"; do if [ -d "$legacy_path" ]; then - legacy_target="$(readlink -f "$legacy_path" || true)" - if [ "$legacy_target" != "$target" ] && [ "$(ls -A "$legacy_path")" ]; then - # -n prevents clobbering anything already present in /config - cp -rn "$legacy_path"/. "$target"/ - fi + cp -rn "$legacy_path"/. "$target"/ + rm -rf "$legacy_target" fi done - rm -rf /data/"$folder" - ln -sf "$target" /data/"$folder" + ln -sf "$target" /config/"$folder" done sudo chown -R nginx:www-data /config/db/ From 007ab63fb61d7373ea8100b1eec39467e263bb70 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 29 Nov 2025 19:56:51 +0100 Subject: [PATCH 4/8] Change symlink target directory from /config to /data --- netalertx/rootfs/etc/cont-init.d/99-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netalertx/rootfs/etc/cont-init.d/99-run.sh b/netalertx/rootfs/etc/cont-init.d/99-run.sh index 2ca2bd706..af74a0ced 100755 --- a/netalertx/rootfs/etc/cont-init.d/99-run.sh +++ b/netalertx/rootfs/etc/cont-init.d/99-run.sh @@ -23,7 +23,7 @@ for folder in config db; do fi done - ln -sf "$target" /config/"$folder" + ln -sf "$target" /data/"$folder" done sudo chown -R nginx:www-data /config/db/ From 1d47e86277c4de62c1f91247c1dfeb7644a17c77 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 29 Nov 2025 20:00:52 +0100 Subject: [PATCH 5/8] Update 99-run.sh --- netalertx/rootfs/etc/cont-init.d/99-run.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/netalertx/rootfs/etc/cont-init.d/99-run.sh b/netalertx/rootfs/etc/cont-init.d/99-run.sh index af74a0ced..16df492e6 100755 --- a/netalertx/rootfs/etc/cont-init.d/99-run.sh +++ b/netalertx/rootfs/etc/cont-init.d/99-run.sh @@ -18,11 +18,15 @@ for folder in config db; do # Migrate existing data from previous locations while avoiding self-copies for legacy_path in "/app/${folder}" "/data/${folder}"; do if [ -d "$legacy_path" ]; then - cp -rn "$legacy_path"/. "$target"/ - rm -rf "$legacy_target" + legacy_target="$(readlink -f "$legacy_path" || true)" + if [ "$legacy_target" != "$target" ] && [ "$(ls -A "$legacy_path")" ]; then + # -n prevents clobbering anything already present in /config + cp -rn "$legacy_path"/. "$target"/ + fi fi done + rm -rf /data/"$folder" ln -sf "$target" /data/"$folder" done From 24fccf5183e902ab5c06a0a9afdae9e64a2ac1fb Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 29 Nov 2025 20:02:44 +0100 Subject: [PATCH 6/8] Update CHANGELOG.md --- netalertx/CHANGELOG.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/netalertx/CHANGELOG.md b/netalertx/CHANGELOG.md index c34312419..f9cbcd98b 100644 --- a/netalertx/CHANGELOG.md +++ b/netalertx/CHANGELOG.md @@ -1,10 +1,7 @@ -- The Home Assistant project has deprecated support for the armv7, armhf and i386 architectures. Support wil be fully dropped in the upcoming Home Assistant 2025.12 release - -- Added support for configuring extra environment variables via the `env_vars` add-on option alongside config.yaml. See https://github.com/alexbelgium/hassio-addons/wiki/Add-Environment-variables-to-your-Addon-2 for details. - -## 25.10.1-2 (29-11-2025) - Breaking change: data directories now use /data symlinks to /config; back up your installation before updating. Migration is supported only from version v25.5.24. - Added tmpfs support for temporary storage. +- The Home Assistant project has deprecated support for the armv7, armhf and i386 architectures. Support wil be fully dropped in the upcoming Home Assistant 2025.12 release +- Added support for configuring extra environment variables via the `env_vars` add-on option alongside config.yaml. See https://github.com/alexbelgium/hassio-addons/wiki/Add-Environment-variables-to-your-Addon-2 for details. ## 25.10.1 (04-10-2025) - Update to latest version from jokob-sk/NetAlertX (changelog : https://github.com/jokob-sk/NetAlertX/releases) From a05bf40be2eb76f84bd12641c0dbc66b100d27f0 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 29 Nov 2025 20:03:28 +0100 Subject: [PATCH 7/8] Update configuration file path in README --- netalertx/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netalertx/README.md b/netalertx/README.md index 5ad9dad1f..9ff93dbe0 100644 --- a/netalertx/README.md +++ b/netalertx/README.md @@ -49,7 +49,7 @@ comparison to installing any other Hass.io add-on. ## Configuration 1. If unavailable, the app generates a default `app.conf` and `app.db` file on the first run. -1. The preferred way is to manage the configuration via the Settings section in the UI, if UI is inaccessible you can modify `app.conf` in the `/data/config/` folder directly. +1. The preferred way is to manage the configuration via the Settings section in the UI, if UI is inaccessible you can modify `app.conf` in the `/config/config/` folder directly. 1. You have to specify which network(s) should be scanned. This is done by entering subnets that are accessible from the host. If you use the default `ARPSCAN` plugin, you have to specify at least one valid subnet and interface in the `SCAN_SUBNETS` setting. See the [documentation on How to set up multiple SUBNETS, VLANs and what are limitations](https://github.com/jokob-sk/NetAlertX/blob/main/docs/SUBNETS.md) and for troubleshooting and more advanced scenarios. 1. Read how to get devices into your [Home Assistant instance via the MQTT plugin](https://github.com/jokob-sk/NetAlertX/blob/main/docs/HOME_ASSISTANT.md) 1. Back everything up by following the [Backups documentation](https://github.com/jokob-sk/NetAlertX/blob/main/docs/BACKUPS.md). From b14b7d15bb18132d18270113c76fd4e18b4e4418 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 29 Nov 2025 20:04:04 +0100 Subject: [PATCH 8/8] Update version and add tmpfs option in config.yaml --- netalertx_fa/config.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/netalertx_fa/config.yaml b/netalertx_fa/config.yaml index 52f9c8378..a342c0915 100644 --- a/netalertx_fa/config.yaml +++ b/netalertx_fa/config.yaml @@ -44,6 +44,7 @@ schema: services: - mqtt:want slug: netalertx_fa +tmpfs: true udev: true url: https://github.com/alexbelgium/hassio-addons -version: 25.10.1 +version: 25.10.1-2