mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-09 09:05:55 +02:00
Update 00-global_var.sh
This commit is contained in:
@@ -16,7 +16,11 @@ for KEYS in ${arr[@]}; do
|
|||||||
VALUE=$(jq ."$KEYS" ${JSONSOURCE})
|
VALUE=$(jq ."$KEYS" ${JSONSOURCE})
|
||||||
line="${KEYS}=${VALUE//[\"\']/}"
|
line="${KEYS}=${VALUE//[\"\']/}"
|
||||||
# Use locally
|
# Use locally
|
||||||
if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi
|
if ! bashio::config.false "verbose" || [[ ! "$line" == *"PASS"* ]]; then
|
||||||
|
bashio::log.blue "$line"
|
||||||
|
else
|
||||||
|
bashio::log.blue "${KEYS}=******redacted******"
|
||||||
|
fi
|
||||||
# Export the variable to run scripts
|
# Export the variable to run scripts
|
||||||
line="${KEYS}=${VALUE//[\"\']/} 2>/dev/null || true"
|
line="${KEYS}=${VALUE//[\"\']/} 2>/dev/null || true"
|
||||||
if cat /etc/services.d/*/*run* &>/dev/null; then sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null; fi
|
if cat /etc/services.d/*/*run* &>/dev/null; then sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null; fi
|
||||||
|
|||||||
Reference in New Issue
Block a user