mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 09:51:02 +01:00
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user