mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-02 05:44:03 +02:00
Avoid exit 1
https://github.com/alexbelgium/hassio-addons/issues/599#issuecomment-1358421496
This commit is contained in:
@@ -7,11 +7,19 @@ CONFIGSOURCE="/config/addons_config/fireflyiii_fints_importer"
|
|||||||
mkdir -p "$CONFIGSOURCE"
|
mkdir -p "$CONFIGSOURCE"
|
||||||
|
|
||||||
# If no file, provide example
|
# 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
|
ln -sf "$CONFIGSOURCE" /data/configurations
|
||||||
|
mkdir -p /app
|
||||||
|
ln -sf "$CONFIGSOURCE" /app/configurations
|
||||||
|
|
||||||
# Make sure permissions are right
|
# Make sure permissions are right
|
||||||
chown -R "$(id -u):$(id -g)" "$CONFIGSOURCE"
|
chown -R "$(id -u):$(id -g)" "$CONFIGSOURCE"
|
||||||
|
|||||||
Reference in New Issue
Block a user