Create 10-migrate.sh

This commit is contained in:
Alexandre
2024-03-17 20:30:42 +01:00
committed by GitHub
parent da3aa2ae8b
commit 4f60bccedf

View File

@@ -0,0 +1,14 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
####################
# Migrate database #
####################
slug=guacamole
if [ -d /homeassistant/addons_config/"$slug" ] && [ ! -d /config/postgres ]; then
echo "Moving database to new location /config"
cp -rf /homeassistant/addons_config/"$slug"/* /config/
fi