Create 01-migrate.sh

https://github.com/alexbelgium/hassio-addons/issues/1354
This commit is contained in:
Alexandre
2024-04-25 20:34:45 +02:00
committed by GitHub
parent af686fc0b6
commit 5a92a7d8d9

View File

@@ -0,0 +1,13 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
####################
# Migrate database #
####################
if [ -d /homeassistant/addons_config/baikal ]; then
echo "Moving database to new location /config, you won't be able to restore previous versions of the addon"
cp -rf /homeassistant/addons_config/baikal/* /config/
rm -r /homeassistant/addons_config/baikal
fi