From 947a9c0c652cf862f2155e84317202e498da2814 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 29 Nov 2021 10:27:33 +0100 Subject: [PATCH] better text --- paperless_ng/rootfs/etc/cont-init.d/90-config_yaml.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/paperless_ng/rootfs/etc/cont-init.d/90-config_yaml.sh b/paperless_ng/rootfs/etc/cont-init.d/90-config_yaml.sh index c2be48bde..a3e2b4ec9 100644 --- a/paperless_ng/rootfs/etc/cont-init.d/90-config_yaml.sh +++ b/paperless_ng/rootfs/etc/cont-init.d/90-config_yaml.sh @@ -61,17 +61,19 @@ function parse_yaml { } # Get variables and export -bashio::log.info "Starting the app with the variables in /config/gazpar2mqtt" +bashio::log.info "Starting the app with the variables in $CONFIGSOURCE" for word in $(parse_yaml "$CONFIGSOURCE" ""); do # Clean output word=${word//[\"\']/} # Data validation if [[ $word =~ ^.+[=].+$ ]]; then - sed -i "1a export $word" /etc/services.d/*/run # Export the variable - sed -i "1a echo \"\$(tput setaf 2)... ENV exported : $word\$(tput sgr0)\"" /etc/services.d/*/run # Show text in colour + sed -i "1a export $word" /etc/services.d/*/run # Export the variable + sed -i "1a echo \$(tput setaf 2)... $word\$(tput setaf 0)" /etc/services.d/*/run # Show text in colour bashio::log.blue "$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} fi + # Color text + sed -i "1a echo \$(tput setaf 2)Exporting ENV variables :\$(tput setaf 0)" /etc/services.d/*/run # Show text in colour done