mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-08 06:50:58 +02:00
Update 01-structure.sh
This commit is contained in:
@@ -11,6 +11,15 @@ done
|
|||||||
DEFAULT_BIRDSONGS_FOLDER="/data/clips/"
|
DEFAULT_BIRDSONGS_FOLDER="/data/clips/"
|
||||||
CONFIG_LOCATIONS=("/config/config.yaml" "/internal/conf/config.yaml")
|
CONFIG_LOCATIONS=("/config/config.yaml" "/internal/conf/config.yaml")
|
||||||
|
|
||||||
|
# Database location
|
||||||
|
bashio::log.info "Setting database location to /config/birdnet.db"
|
||||||
|
for configloc in "${CONFIG_LOCATIONS[@]}"; do
|
||||||
|
if [ -f "$configloc" ]; then
|
||||||
|
yq -i -y ".output.sqlite.path = \"/config/birdnet.db\"" "$configloc"
|
||||||
|
bashio::log.info "Updated database path in $configloc"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# Migrate Database
|
# Migrate Database
|
||||||
if [ -f /data/birdnet.db ]; then
|
if [ -f /data/birdnet.db ]; then
|
||||||
bashio::log.warning "Moving db to /config"
|
bashio::log.warning "Moving db to /config"
|
||||||
|
|||||||
Reference in New Issue
Block a user