mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-25 07:20:31 +02:00
forced configsource
This commit is contained in:
@@ -1,18 +1,17 @@
|
|||||||
#!/usr/bin/env bashio
|
#!/usr/bin/env bashio
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
CONFIGSOURCE=$(bashio::config "CONFIG_LOCATION")
|
CONFIGSOURCE="/config/addons_config/fireflyiii_fints_importer"
|
||||||
CONFIGSOURCE=$(dirname "$CONFIGSOURCE")
|
|
||||||
|
|
||||||
# Create directory
|
# Create directory
|
||||||
mkdir -p "$CONFIGSOURCE"
|
mkdir -p "$CONFIGSOURCE"
|
||||||
|
|
||||||
# If no file, provide example
|
# If no file, provide example
|
||||||
[ ! "$(ls -A "${CONFIGSOURCE}")" ] && cp -rn /app/data/configurations/* "$CONFIGSOURCE"/
|
[ ! "$(ls -A "${CONFIGSOURCE}")" ] && cp -rn /app/configurations/* "$CONFIGSOURCE"/
|
||||||
|
|
||||||
# Create symlinks
|
# Create symlinks
|
||||||
rm -r /app/data/configurations
|
rm -r /app/configurations
|
||||||
ln -sf "$CONFIGSOURCE" /app/data/configurations
|
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