alexbelgium
2025-05-28 09:04:21 +02:00
parent 591f19c3f3
commit 46ff55c8b6
2 changed files with 5 additions and 14 deletions

View File

@@ -7,7 +7,10 @@ set -e
#################### ####################
if [ -d /homeassistant/addons_config/calibre-web ] && [ ! -L /homeassistant/addons_config/calibre-web ]; then if [ -d /homeassistant/addons_config/calibre-web ] && [ ! -L /homeassistant/addons_config/calibre-web ]; then
echo "Moving database to new location /config" if [ "$(ls -A /homeassistant/addons_config/calibre-web)" ]; then
cp -rf /homeassistant/addons_config/calibre-web/* /config/ echo "Moving database to new location /config"
cp -rf /homeassistant/addons_config/calibre-web/* "$LOCATION"/
fi
rm -r /homeassistant/addons_config/calibre-web rm -r /homeassistant/addons_config/calibre-web
fi fi

View File

@@ -51,15 +51,3 @@ mkdir -p "$LOCATION"
# Set ownership # Set ownership
bashio::log.info "Setting ownership to $PUID:$PGID" bashio::log.info "Setting ownership to $PUID:$PGID"
chown "$PUID":"$PGID" "$LOCATION" chown "$PUID":"$PGID" "$LOCATION"
####################
# Migrate database #
####################
if [ -d /homeassistant/addons_config/calibre-web ]; then
if [ "$(ls -A /homeassistant/addons_config/calibre-web)" ]; then
echo "Moving database to new location /config"
cp -rf /homeassistant/addons_config/calibre-web/* "$LOCATION"/
fi
rm -r /homeassistant/addons_config/calibre-web
fi