mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-17 19:40:31 +02:00
Update 20-folders.sh
This commit is contained in:
@@ -6,12 +6,12 @@ set -e
|
|||||||
# Migrate database #
|
# Migrate database #
|
||||||
####################
|
####################
|
||||||
|
|
||||||
if [ -f /config/addons_config/filebrowser/filebrowser.dB ]; then
|
if [ -f /homeassistant/addons_config/filebrowser/filebrowser.dB ]; then
|
||||||
echo "Moving database to new location /config"
|
echo "Moving database to new location /config"
|
||||||
mkdir -p /config
|
mkdir -p /config
|
||||||
chmod 777 /config
|
chmod 777 /config
|
||||||
cp -rnf /config/addons_config/filebrowser/* /config/
|
cp -rnf /homeassistant/addons_config/filebrowser/* /config/
|
||||||
rm -r /config/addons_config/filebrowser
|
rm -r /homeassistant/addons_config/filebrowser
|
||||||
fi
|
fi
|
||||||
|
|
||||||
######################
|
######################
|
||||||
@@ -21,6 +21,8 @@ fi
|
|||||||
# Clean symlinks
|
# Clean symlinks
|
||||||
find /config -maxdepth 1 -type l -delete
|
find /config -maxdepth 1 -type l -delete
|
||||||
find /homeassistant/addons_config -maxdepth 1 -type l -delete
|
find /homeassistant/addons_config -maxdepth 1 -type l -delete
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|||||||
Reference in New Issue
Block a user