Update 20-folders.sh

This commit is contained in:
Alexandre
2022-04-12 20:18:47 +02:00
committed by GitHub
parent 1217d49742
commit 8b92d2ced3

View File

@@ -5,14 +5,12 @@ CONFIGSOURCE=$(bashio::config "CONFIG_LOCATION")
CONFIGSOURCE=$(dirname "$CONFIGSOURCE")
# Create directory
mkdir -p "$CONFIGSOURCE" || true
mkdir -p "$CONFIGSOURCE/import_files" || true
mkdir -p "$CONFIGSOURCE/configurations" || true
mkdir -p "$CONFIGSOURCE"
# Create symlinks
cp -rnf /data/configurations "$CONFIGSOURCE"
rm -r /data/configurations
ln -s "$CONFIGSOURCE"/configurations /data
ln -sf "$CONFIGSOURCE" /data/configurations
# Make sure permissions are right
chown -R "$(id -u):$(id -g)" "$CONFIGSOURCE"