Update 20-folders.sh

This commit is contained in:
Alexandre
2022-04-12 20:40:10 +02:00
committed by GitHub
parent 9a7f805345
commit 25fdd1e2d6

View File

@@ -7,9 +7,12 @@ CONFIGSOURCE=$(dirname "$CONFIGSOURCE")
# Create directory
mkdir -p "$CONFIGSOURCE"
# If no file, provide example
[ ! "$(ls -A "${CONFIGSOURCE}")" ] && cp -rn /app/data/configurations/* "$CONFIGSOURCE"/
# Create symlinks
rm -r /data/configurations
ln -sf "$CONFIGSOURCE" /data/configurations
rm -r /app/data/configurations
ln -sf "$CONFIGSOURCE" /app/data/configurations
# Make sure permissions are right
chown -R "$(id -u):$(id -g)" "$CONFIGSOURCE"