From 7b74f8f1e2c3eabf1a90ac9923db933f054ca487 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 24 Jan 2023 06:52:15 +0100 Subject: [PATCH] Update 99-run.sh --- enedisgateway2mqtt_dev/rootfs/etc/cont-init.d/99-run.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/enedisgateway2mqtt_dev/rootfs/etc/cont-init.d/99-run.sh b/enedisgateway2mqtt_dev/rootfs/etc/cont-init.d/99-run.sh index ce90ecce4..68eaef97c 100755 --- a/enedisgateway2mqtt_dev/rootfs/etc/cont-init.d/99-run.sh +++ b/enedisgateway2mqtt_dev/rootfs/etc/cont-init.d/99-run.sh @@ -59,7 +59,9 @@ fi # Check if config file is there, or create one from template if [ -f "$CONFIGSOURCE" ]; then # Create symlink if not existing yet - [ ! -L /data/config.yaml ] && ln -sf "$CONFIGSOURCE" /data + # shellcheck disable=SC2015 + [ -f /data/config.yaml ] && rm /data/config.yaml || true + ln -sf "$CONFIGSOURCE" /data || true bashio::log.info "Using config file found in $CONFIGSOURCE" # Check if yaml is valid