Change config folder

https://github.com/alexbelgium/hassio-addons/issues/599
This commit is contained in:
Alexandre
2022-12-14 20:10:47 +01:00
committed by GitHub
parent 43980504b8
commit a9a4bd8553

View File

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