mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 09:51:02 +01:00
Create 01-migrate.sh
https://github.com/alexbelgium/hassio-addons/issues/1354
This commit is contained in:
13
baikal/rootfs/etc/cont-init.d/01-migrate.sh
Normal file
13
baikal/rootfs/etc/cont-init.d/01-migrate.sh
Normal 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
|
||||
Reference in New Issue
Block a user