From c7d1e46b2a0fd8b14197680beb6a8052b4bdd815 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 15 Nov 2021 18:47:04 +0100 Subject: [PATCH] Update 99-run.sh --- enedisgateway2mqtt/rootfs/scripts/99-run.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/enedisgateway2mqtt/rootfs/scripts/99-run.sh b/enedisgateway2mqtt/rootfs/scripts/99-run.sh index efc543b74..58598a1d6 100644 --- a/enedisgateway2mqtt/rootfs/scripts/99-run.sh +++ b/enedisgateway2mqtt/rootfs/scripts/99-run.sh @@ -13,12 +13,13 @@ if bashio::config.true "test"; then echo "Using config file found in $CONFIGSOURCE" else echo "No config file, creating one from template" + # Create folder + mkdir -p "$(dirname "${CONFIGSOURCE}")" # Downloading template TEMPLATESOURCE="https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/enedisgateway2mqtt/rootfs/templates/config.yaml" - curl -L -f -s $TEMPLATESOURCE + curl -L -f -s $TEMPLATESOURCE --output $CONFIGSOURCE # Placing template in config - mkdir -p "$(dirname "${CONFIGSOURCE}")" - cp config.yaml "$(dirname "${CONFIGSOURCE}")" + #cp config.yaml "$(dirname "${CONFIGSOURCE}")" # Need to restart bashio::log.fatal "Config file not found, creating a new one. Please customize the file in $CONFIGSOURCE before restarting." bashio::exit.nok