Alexandre
2022-12-19 22:57:26 +01:00
committed by GitHub
parent 953c3f8bb3
commit 2d3b9aafbc

View File

@@ -7,11 +7,19 @@ CONFIGSOURCE="/config/addons_config/fireflyiii_fints_importer"
mkdir -p "$CONFIGSOURCE"
# If no file, provide example
[ ! "$(ls -A "${CONFIGSOURCE}")" ] && cp -r /data/configurations/* "$CONFIGSOURCE"/
if [ ! "$(ls -A "${CONFIGSOURCE}")" ] && [ -f /data/configurations ];
cp -r /data/configurations/* "$CONFIGSOURCE"/ || true
rm -r /data/configurations
fi
if [ ! "$(ls -A "${CONFIGSOURCE}")" ] && [ -f /app/configurations ];
cp -r /app/configurations/* "$CONFIGSOURCE"/ || true
rm -r /app/configurations
fi
# Create symlinks
rm -r /data/configurations
ln -sf "$CONFIGSOURCE" /data/configurations
mkdir -p /app
ln -sf "$CONFIGSOURCE" /app/configurations
# Make sure permissions are right
chown -R "$(id -u):$(id -g)" "$CONFIGSOURCE"