From f9cfbe402b9398e9d8298e45726fc41af9b6016a Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 28 Jan 2026 19:59:55 +0100 Subject: [PATCH] Fix data migration ordering --- birdnet-pipy/rootfs/etc/cont-init.d/01-structure.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/birdnet-pipy/rootfs/etc/cont-init.d/01-structure.sh b/birdnet-pipy/rootfs/etc/cont-init.d/01-structure.sh index 87f1a0570..6c102d648 100755 --- a/birdnet-pipy/rootfs/etc/cont-init.d/01-structure.sh +++ b/birdnet-pipy/rootfs/etc/cont-init.d/01-structure.sh @@ -18,7 +18,6 @@ LEGACY1="/config/birdnet-pipy/data" LEGACY2="/data" mkdir -p "${DATA_LOCATION}" -mkdir -p "${DATA_LOCATION}/config" "${DATA_LOCATION}/clips" "${DATA_LOCATION}/logs" "${DATA_LOCATION}/cache" || true if [ -z "$(ls -A "${DATA_LOCATION}" 2>/dev/null || true)" ]; then if [ -d "${LEGACY1}" ] && [ -n "$(ls -A "${LEGACY1}" 2>/dev/null || true)" ]; then @@ -30,6 +29,8 @@ if [ -z "$(ls -A "${DATA_LOCATION}" 2>/dev/null || true)" ]; then fi fi +mkdir -p "${DATA_LOCATION}/config" "${DATA_LOCATION}/clips" "${DATA_LOCATION}/logs" "${DATA_LOCATION}/cache" || true + rm -rf /app/data ln -s "${DATA_LOCATION}" /app/data