From 02ddfe2bbcfb2eab3f4f0759ef9aaaeb105311fb Mon Sep 17 00:00:00 2001 From: Alexandre Date: Sat, 13 Nov 2021 15:02:42 +0100 Subject: [PATCH] correct --- enedisgateway2mqtt/rootfs/scripts/99-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enedisgateway2mqtt/rootfs/scripts/99-run.sh b/enedisgateway2mqtt/rootfs/scripts/99-run.sh index 0300f69fd..29632985e 100644 --- a/enedisgateway2mqtt/rootfs/scripts/99-run.sh +++ b/enedisgateway2mqtt/rootfs/scripts/99-run.sh @@ -20,7 +20,7 @@ mapfile -t arr < <(jq -r 'keys[]' ${JSONSOURCE}) # For all keys in options.json for KEYS in ${arr[@]}; do # if the custom_var field is used - if ${KEYS} ="custom_var"; then + if [ "${KEYS}" = "custom_var" ]; then VALUES=$(jq .$KEYS ${JSONSOURCE}) for SUBKEYS in ${VALUES//,/ }; do [[ ! $SUBKEYS =~ ^.+[=].+$ ]] && bashio::log.fatal "Your custom_var field does not follow the structure KEY=\"text\",KEY2=\"text2\" it will be ignored" && continue || true