symlinks test

This commit is contained in:
jokob-sk
2025-01-11 08:41:08 +11:00
parent ec106120c0
commit 6734dfdc7a
3 changed files with 25 additions and 0 deletions

View File

@@ -4,6 +4,22 @@ set -e
bashio::log.warning "App starting."
# In the addon script, make symlinks on the fly
echo "Creating symlinks"
for folder in config db; do
echo "Creating for $folder"
# Create symlinks
mkdir -p /config/"$folder"
if [ -d /app/"$folder" ] && [ "$(ls -A /app/"$folder")" ]; then
cp -rn /app/"$folder"/* /config/"$folder"/
fi
rm -r /app/"$folder"
ln -sf /config/"$folder" /app/"$folder"
done
##############
# LAUNCH APP #
##############