mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-02 13:54:05 +02:00
allow removal of log if non verbose
This commit is contained in:
@@ -15,7 +15,7 @@ for KEYS in ${arr[@]}; do
|
|||||||
VALUE=$(jq .$KEYS ${JSONSOURCE})
|
VALUE=$(jq .$KEYS ${JSONSOURCE})
|
||||||
line="${KEYS}=${VALUE//[\"\']/}"
|
line="${KEYS}=${VALUE//[\"\']/}"
|
||||||
# Use locally
|
# Use locally
|
||||||
bashio::log.blue "$line"
|
if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi
|
||||||
export $line
|
export $line
|
||||||
# Export the variable to run scripts
|
# Export the variable to run scripts
|
||||||
line="${KEYS}=${VALUE//[\"\']/} &>/dev/null"
|
line="${KEYS}=${VALUE//[\"\']/} &>/dev/null"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ for KEYS in ${arr[@]}; do
|
|||||||
VALUE=$(jq .$KEYS ${JSONSOURCE})
|
VALUE=$(jq .$KEYS ${JSONSOURCE})
|
||||||
line="${KEYS}=${VALUE//[\"\']/}"
|
line="${KEYS}=${VALUE//[\"\']/}"
|
||||||
# Use locally
|
# Use locally
|
||||||
bashio::log.blue "$line"
|
if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi
|
||||||
export $line
|
export $line
|
||||||
# Export the variable to run scripts
|
# Export the variable to run scripts
|
||||||
line="${KEYS}=${VALUE//[\"\']/} &>/dev/null"
|
line="${KEYS}=${VALUE//[\"\']/} &>/dev/null"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ for KEYS in ${arr[@]}; do
|
|||||||
VALUE=$(jq .$KEYS ${JSONSOURCE})
|
VALUE=$(jq .$KEYS ${JSONSOURCE})
|
||||||
line="${KEYS}=${VALUE//[\"\']/}"
|
line="${KEYS}=${VALUE//[\"\']/}"
|
||||||
# Use locally
|
# Use locally
|
||||||
bashio::log.blue "$line"
|
if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi
|
||||||
export $line
|
export $line
|
||||||
# Export the variable to run scripts
|
# Export the variable to run scripts
|
||||||
line="${KEYS}=${VALUE//[\"\']/} &>/dev/null"
|
line="${KEYS}=${VALUE//[\"\']/} &>/dev/null"
|
||||||
|
|||||||
@@ -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" /etc/services.d/*/*run* 2>/dev/null || true
|
||||||
sed -i "1a export $line" /scripts/*run* 2>/dev/null || true
|
sed -i "1a export $line" /scripts/*run* 2>/dev/null || true
|
||||||
# Show in log
|
# Show in log
|
||||||
bashio::log.blue "$line"
|
if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi
|
||||||
else
|
else
|
||||||
bashio::exit.nok "$line does not follow the correct structure. Please check your yaml file."
|
bashio::exit.nok "$line does not follow the correct structure. Please check your yaml file."
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -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" /etc/services.d/*/*run* 2>/dev/null || true
|
||||||
sed -i "1a export $line" /scripts/*run* 2>/dev/null || true
|
sed -i "1a export $line" /scripts/*run* 2>/dev/null || true
|
||||||
# Show in log
|
# Show in log
|
||||||
bashio::log.blue "$line"
|
if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi
|
||||||
else
|
else
|
||||||
bashio::exit.nok "$line does not follow the correct structure. Please check your yaml file."
|
bashio::exit.nok "$line does not follow the correct structure. Please check your yaml file."
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -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" /etc/services.d/*/*run* 2>/dev/null || true
|
||||||
sed -i "1a export $line" /scripts/*run* 2>/dev/null || true
|
sed -i "1a export $line" /scripts/*run* 2>/dev/null || true
|
||||||
# Show in log
|
# Show in log
|
||||||
bashio::log.blue "$line"
|
if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi
|
||||||
else
|
else
|
||||||
bashio::exit.nok "$line does not follow the correct structure. Please check your yaml file."
|
bashio::exit.nok "$line does not follow the correct structure. Please check your yaml file."
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user