mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
18 lines
441 B
Bash
18 lines
441 B
Bash
#!/usr/bin/env bashio
|
|
# shellcheck shell=bash
|
|
|
|
CONFIGSOURCE="/config/addons_config/fireflyiii_fints_importer"
|
|
|
|
# Create directory
|
|
mkdir -p "$CONFIGSOURCE"
|
|
|
|
# If no file, provide example
|
|
[ ! "$(ls -A "${CONFIGSOURCE}")" ] && cp -rn /data/configurations/* "$CONFIGSOURCE"/
|
|
|
|
# Create symlinks
|
|
rm -r /data/configurations
|
|
ln -sf "$CONFIGSOURCE" /data/configurations
|
|
|
|
# Make sure permissions are right
|
|
chown -R "$(id -u):$(id -g)" "$CONFIGSOURCE"
|