Skip to content

Commit

Permalink
Update 20-folders.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbelgium authored Nov 25, 2023
1 parent 5810a3b commit ed063b1
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions filebrowser/rootfs/etc/cont-init.d/20-folders.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,20 @@ fi
# Clean symlinks
find /config -maxdepth 1 -type l -delete
find /homeassistant/addons_config -maxdepth 1 -type l -delete
if [ -d /homeassistant ]; then
if [ -d /config/addons_config ]; then
rm -r /config/addons_config
fi
if [ -d /config/addons_autoscripts ]; then
rm -r /config/addons_autoscripts
fi
fi

# Create symlinks
ln -fs /homeassistant/addons_config /config
ln -fs /homeassistant/addons_autoscripts /config
for folders in $(find /addon_configs -maxdepth 1 -type d -not -name "*filebrowser*"); do
ln -fs "/${folders##*\/}" /config/addons_config
ln -s /homeassistant/addons_config /config
ln -s /homeassistant/addons_autoscripts /config

for folders in $(find /addon_configs/ -maxdepth 1 -mindepth 1 -type d -not -name "*filebrowser*"); do
ln -fs "${folders}" /config/addons_config/
echo $folders
done

0 comments on commit ed063b1

Please sign in to comment.