From 5c1e878fd117cd76ffb334945ce77ac631148998 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Mon, 20 Dec 2021 09:31:57 +0100 Subject: [PATCH] allow removal of log if non verbose --- arpspoof/rootfs/scripts/00-global_var.sh | 2 +- enedisgateway2mqtt_dev/rootfs/scripts/00-global_var.sh | 2 +- joplin/rootfs/scripts/00-global_var.sh | 2 +- paperless_ng/rootfs/etc/cont-init.d/90-config_yaml.sh | 2 +- webtrees/rootfs/scripts/90-config_yaml.sh | 2 +- zzz_templates/90-config_yaml.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arpspoof/rootfs/scripts/00-global_var.sh b/arpspoof/rootfs/scripts/00-global_var.sh index f49cd70ed..e88ad363a 100644 --- a/arpspoof/rootfs/scripts/00-global_var.sh +++ b/arpspoof/rootfs/scripts/00-global_var.sh @@ -15,7 +15,7 @@ for KEYS in ${arr[@]}; do VALUE=$(jq .$KEYS ${JSONSOURCE}) line="${KEYS}=${VALUE//[\"\']/}" # Use locally - bashio::log.blue "$line" + if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi export $line # Export the variable to run scripts line="${KEYS}=${VALUE//[\"\']/} &>/dev/null" diff --git a/enedisgateway2mqtt_dev/rootfs/scripts/00-global_var.sh b/enedisgateway2mqtt_dev/rootfs/scripts/00-global_var.sh index f49cd70ed..e88ad363a 100644 --- a/enedisgateway2mqtt_dev/rootfs/scripts/00-global_var.sh +++ b/enedisgateway2mqtt_dev/rootfs/scripts/00-global_var.sh @@ -15,7 +15,7 @@ for KEYS in ${arr[@]}; do VALUE=$(jq .$KEYS ${JSONSOURCE}) line="${KEYS}=${VALUE//[\"\']/}" # Use locally - bashio::log.blue "$line" + if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi export $line # Export the variable to run scripts line="${KEYS}=${VALUE//[\"\']/} &>/dev/null" diff --git a/joplin/rootfs/scripts/00-global_var.sh b/joplin/rootfs/scripts/00-global_var.sh index f49cd70ed..e88ad363a 100644 --- a/joplin/rootfs/scripts/00-global_var.sh +++ b/joplin/rootfs/scripts/00-global_var.sh @@ -15,7 +15,7 @@ for KEYS in ${arr[@]}; do VALUE=$(jq .$KEYS ${JSONSOURCE}) line="${KEYS}=${VALUE//[\"\']/}" # Use locally - bashio::log.blue "$line" + if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi export $line # Export the variable to run scripts line="${KEYS}=${VALUE//[\"\']/} &>/dev/null" 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 e37468ce2..0863cb6e5 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 @@ -86,7 +86,7 @@ while IFS= read -r line; do sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null || true sed -i "1a export $line" /scripts/*run* 2>/dev/null || true # Show in log - bashio::log.blue "$line" + if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi else bashio::exit.nok "$line does not follow the correct structure. Please check your yaml file." fi diff --git a/webtrees/rootfs/scripts/90-config_yaml.sh b/webtrees/rootfs/scripts/90-config_yaml.sh index e37468ce2..0863cb6e5 100644 --- a/webtrees/rootfs/scripts/90-config_yaml.sh +++ b/webtrees/rootfs/scripts/90-config_yaml.sh @@ -86,7 +86,7 @@ while IFS= read -r line; do sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null || true sed -i "1a export $line" /scripts/*run* 2>/dev/null || true # Show in log - bashio::log.blue "$line" + if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi else bashio::exit.nok "$line does not follow the correct structure. Please check your yaml file." fi diff --git a/zzz_templates/90-config_yaml.sh b/zzz_templates/90-config_yaml.sh index e37468ce2..0863cb6e5 100644 --- a/zzz_templates/90-config_yaml.sh +++ b/zzz_templates/90-config_yaml.sh @@ -86,7 +86,7 @@ while IFS= read -r line; do sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null || true sed -i "1a export $line" /scripts/*run* 2>/dev/null || true # Show in log - bashio::log.blue "$line" + if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi else bashio::exit.nok "$line does not follow the correct structure. Please check your yaml file." fi