From 03d17f0135bb829ae7713ec24aa86df2a124aff9 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Sat, 13 Nov 2021 15:22:10 +0100 Subject: [PATCH] log --- enedisgateway2mqtt/rootfs/scripts/99-run.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/enedisgateway2mqtt/rootfs/scripts/99-run.sh b/enedisgateway2mqtt/rootfs/scripts/99-run.sh index 33b2ab03b..b12945b21 100644 --- a/enedisgateway2mqtt/rootfs/scripts/99-run.sh +++ b/enedisgateway2mqtt/rootfs/scripts/99-run.sh @@ -30,7 +30,7 @@ for KEYS in ${arr[@]}; do # Write it in the config file echo ${SUBKEYS} >>${CONFIGSOURCE} # Say it loud - echo "... ${SUBKEYS}" + # echo "... ${SUBKEYS}" done # If it is a normal field else @@ -39,7 +39,7 @@ for KEYS in ${arr[@]}; do # Write it in the config file echo "${KEYS}=$(jq .$KEYS ${JSONSOURCE})" >>${CONFIGSOURCE} # Say it loud - echo "... ${KEYS}=$(jq .$KEYS ${JSONSOURCE})" + # echo "... ${KEYS}=$(jq .$KEYS ${JSONSOURCE})" fi done @@ -47,6 +47,8 @@ done # Read all config options # ########################### +bashio::log.info "Starting the app with the variables in /config/enedisgateway2mqtt" + # Replace all "" with '' sed -i 's|"|'\''|g' $CONFIGSOURCE @@ -55,7 +57,7 @@ for word in $(cat $CONFIGSOURCE); do # Data validation if [[ $word =~ ^.+[=].+$ ]]; then export "$word" # Export the variable - echo "$word" + bashio::log.info "... $word" else bashio::log.fatal "$word does not follow the structure KEY=\'text\', it will be ignored and removed from the config" sed -i "/$word/ d" ${CONFIGSOURCE}