mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-19 22:09:14 +02:00
Fix FileBrowser Quantum database migration path to use correct addon_configs directory
The migration code was checking `/homeassistant/addons_config/filebrowser_quantum/` but the actual HA addon config path is `/homeassistant/addon_configs/db21ed7f_filebrowser_quantum/`. Changes: - Add migration check for the correct addon_configs path with slug prefix - Handle the standard `addon_configs` directory for symlink operations - Keep legacy `addons_config` path support for backward compatibility Fixes: Configuration doesn't survive over restarts
This commit is contained in:
committed by
GitHub
parent
830c6cebec
commit
b48899b5bf
@@ -7,11 +7,16 @@ set -e
|
|||||||
####################
|
####################
|
||||||
|
|
||||||
if [ -f /homeassistant/addons_config/filebrowser_quantum/filebrowser_quantum.db ]; then
|
if [ -f /homeassistant/addons_config/filebrowser_quantum/filebrowser_quantum.db ]; then
|
||||||
echo "Moving database to new location /config"
|
echo "Moving database from legacy addons_config location to /config"
|
||||||
cp -rnf /homeassistant/addons_config/filebrowser_quantum/* /config/
|
cp -rnf /homeassistant/addons_config/filebrowser_quantum/* /config/
|
||||||
rm -r /homeassistant/addons_config/filebrowser_quantum
|
rm -r /homeassistant/addons_config/filebrowser_quantum
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -f /config/filebrowser_quantum.db ] && [ -f /homeassistant/addon_configs/db21ed7f_filebrowser_quantum/filebrowser_quantum.db ]; then
|
||||||
|
echo "Moving database from addon_configs location to /config"
|
||||||
|
cp -rnf /homeassistant/addon_configs/db21ed7f_filebrowser_quantum/* /config/
|
||||||
|
fi
|
||||||
|
|
||||||
######################
|
######################
|
||||||
# Link addon folders #
|
# Link addon folders #
|
||||||
######################
|
######################
|
||||||
@@ -21,12 +26,18 @@ find /config -maxdepth 1 -type l -delete
|
|||||||
if [ -d /homeassistant/addons_config ]; then
|
if [ -d /homeassistant/addons_config ]; then
|
||||||
find /homeassistant/addons_config -maxdepth 1 -type l -delete
|
find /homeassistant/addons_config -maxdepth 1 -type l -delete
|
||||||
fi
|
fi
|
||||||
|
if [ -d /homeassistant/addon_configs ]; then
|
||||||
|
find /homeassistant/addon_configs -maxdepth 1 -type l -delete
|
||||||
|
fi
|
||||||
|
|
||||||
# Remove erroneous folders
|
# Remove erroneous folders
|
||||||
if [ -d /homeassistant ]; then
|
if [ -d /homeassistant ]; then
|
||||||
if [ -d /config/addons_config ]; then
|
if [ -d /config/addons_config ]; then
|
||||||
rm -r /config/addons_config
|
rm -r /config/addons_config
|
||||||
fi
|
fi
|
||||||
|
if [ -d /config/addon_configs ]; then
|
||||||
|
rm -r /config/addon_configs
|
||||||
|
fi
|
||||||
if [ -d /config/addons_autoscripts ]; then
|
if [ -d /config/addons_autoscripts ]; then
|
||||||
rm -r /config/addons_autoscripts
|
rm -r /config/addons_autoscripts
|
||||||
fi
|
fi
|
||||||
@@ -36,6 +47,9 @@ fi
|
|||||||
if [ -d /homeassistant/addons_config ]; then
|
if [ -d /homeassistant/addons_config ]; then
|
||||||
ln -s /homeassistant/addons_config /config
|
ln -s /homeassistant/addons_config /config
|
||||||
find /addon_configs/ -maxdepth 1 -mindepth 1 -type d -not -name "*filebrowser_quantum*" -exec ln -s {} /config/addons_config/ \;
|
find /addon_configs/ -maxdepth 1 -mindepth 1 -type d -not -name "*filebrowser_quantum*" -exec ln -s {} /config/addons_config/ \;
|
||||||
|
elif [ -d /homeassistant/addon_configs ]; then
|
||||||
|
ln -s /homeassistant/addon_configs /config
|
||||||
|
find /addon_configs/ -maxdepth 1 -mindepth 1 -type d -not -name "*filebrowser_quantum*" -exec ln -s {} /config/addon_configs/ \;
|
||||||
fi
|
fi
|
||||||
if [ -d /homeassistant/addons_autoscripts ]; then
|
if [ -d /homeassistant/addons_autoscripts ]; then
|
||||||
ln -s /homeassistant/addons_autoscripts /config
|
ln -s /homeassistant/addons_autoscripts /config
|
||||||
|
|||||||
Reference in New Issue
Block a user