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 09f44d46b..8b3ed624c 100755 --- a/birdnet-go/rootfs/etc/cont-init.d/01-structure.sh +++ b/birdnet-go/rootfs/etc/cont-init.d/01-structure.sh @@ -6,14 +6,14 @@ set -e DEFAULT_BIRDSONGS_FOLDER="/data/clips/" CONFIG_LOCATION="/config/config.yaml" -if [ ! -f /config/config.yaml ]; then +if [ ! -f "$CONFIG_LOCATION" ]; then bashio::log.warning "There is no config.yaml yet in the config folder, downloading a default one. Please customize" - curl -L -s -S https://raw.githubusercontent.com/tphakala/birdnet-go/refs/heads/main/internal/conf/config.yaml -o /config/config.yaml + curl -L -s -S https://raw.githubusercontent.com/tphakala/birdnet-go/refs/heads/main/internal/conf/config.yaml -o "$CONFIG_LOCATION" fi # Use alternative location in case of need mkdir -p /root/.config/birdnet-go/ -ln -sf "$CONFIG_LOCATION" /root/.config/birdnet-go/config.yaml +ln -sf "$CONFIG_LOCATION" /root/.config/birdnet-go/ ################# # Migrate Database