Download default config.yaml if not present

https://github.com/alexbelgium/hassio-addons/issues/1781#issuecomment-2882951761
This commit is contained in:
Alexandre
2025-05-15 10:23:49 +02:00
committed by GitHub
parent 7c1046ff49
commit 7b260f59f0

View File

@@ -4,11 +4,11 @@ set -e
# Default Variables
DEFAULT_BIRDSONGS_FOLDER="/data/clips/"
CONFIG_LOCATIONS=("/config/config.yaml" "/internal/conf/config.yaml")
CONFIG_LOCATIONS=("/config/config.yaml")
if [ ! -f /config/config.yaml ]; then
bashio::log.warning "There is no config.yaml yet in the config folder, creating a default one. Please customize"
cp /internal/conf/config.yaml /config/
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
fi
#################