Files
hassio-addons/calibre_web/rootfs/etc/cont-init.d/00-a_migrate.sh
Alexandre 4f995c6566 Clean
2025-05-25 13:15:07 +02:00

14 lines
405 B
Bash
Executable File

#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
####################
# Migrate database #
####################
if [ -d /homeassistant/addons_config/calibre-web ] && [ ! -L /homeassistant/addons_config/calibre-web ]; then
echo "Moving database to new location /config"
cp -rf /homeassistant/addons_config/calibre-web/* /config/
rm -r /homeassistant/addons_config/calibre-web
fi