From e20e81a9a72cd61678583c301ed8381f09d200dd Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 19 Jan 2025 18:30:22 +0100 Subject: [PATCH] Static db path https://github.com/alexbelgium/hassio-addons/issues/1730 --- birdnet-go/rootfs/etc/cont-init.d/01-structure.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/birdnet-go/rootfs/etc/cont-init.d/01-structure.sh b/birdnet-go/rootfs/etc/cont-init.d/01-structure.sh index 9493c71c5..0391dfb41 100755 --- a/birdnet-go/rootfs/etc/cont-init.d/01-structure.sh +++ b/birdnet-go/rootfs/etc/cont-init.d/01-structure.sh @@ -108,11 +108,11 @@ if [ -f /config/birdnet.db ]; then CHECK_QUERY="SELECT COUNT(*) FROM notes WHERE clip_name LIKE '%//%';" UPDATE_QUERY="UPDATE notes SET clip_name = REPLACE(clip_name, '//', '/') WHERE clip_name LIKE '%//%';" # Check for occurrences of '//' in clip_name - COUNT=$(sqlite3 "$DB_FILE" "$CHECK_QUERY") + COUNT=$(sqlite3 /config/birdnet.db "$CHECK_QUERY") if [ "$COUNT" -gt 0 ]; then echo "Found $COUNT rows with '//' in clip_name. Running the update query..." - sqlite3 "$DB_FILE" "$UPDATE_QUERY" + sqlite3 /config/birdnet.db "$UPDATE_QUERY" echo "Update completed" fi fi