From 58dcb8571add7764ca04cf639692a31afb43ed0e Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 3 Dec 2021 18:12:41 +0100 Subject: [PATCH] Update 90-config_yaml.sh --- gazpar2mqtt/rootfs/scripts/90-config_yaml.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gazpar2mqtt/rootfs/scripts/90-config_yaml.sh b/gazpar2mqtt/rootfs/scripts/90-config_yaml.sh index 0474d0445..4d345d171 100644 --- a/gazpar2mqtt/rootfs/scripts/90-config_yaml.sh +++ b/gazpar2mqtt/rootfs/scripts/90-config_yaml.sh @@ -82,15 +82,14 @@ while IFS= read -r line; do # Data validation if [[ $line =~ ^.+[=].+$ ]]; then export $line # Export the variable + logmsg="Variable set : $line" if [ -f /etc/services.d/*/*run* ]; then sed -i "1a export $line" /etc/services.d/*/run # Export the variable - sed -i "1a echo \$(tput setaf 2)Variable set : $line\$(tput setaf 0)" /etc/services.d/*/run # Show text in colour - sed -i "1a export TERM=dumb" /etc/services.d/*/run # Show text in colour + sed -i "1a bashio::log.blue $logmsg || (export TERM=dumb && echo \$(tput setaf 2)$logmsg\$(tput setaf 0)" /etc/services.d/*/run) # Show text in colour fi if [ -f /scripts/*run* ]; then sed -i "1a export $line" /scripts/*run* # Export the variable - sed -i "1a echo \$(tput setaf 2)Variable set : $line\$(tput setaf 0)" /scripts/*run* # Show text in colour - sed -i "1a export TERM=dumb" /scripts/*run* # Show text in colour + sed -i "1a bashio::log.blue $logmsg || (export TERM=dumb && \$(tput setaf 2)$logmsg\$(tput setaf 0)" /scripts/*run*) # Show text in colour fi bashio::log.blue "$line" else