Update 00-global_var.sh

This commit is contained in:
Alexandre
2024-01-09 11:47:45 +01:00
committed by GitHub
parent 0599442d2a
commit db941f232c

View File

@@ -33,9 +33,12 @@ for KEYS in "${arr[@]}"; do
VALUE="${VALUE//[\"\']/}"
line="${KEYS}='${VALUE}'"
# Check if secret
if [[ "${line}" == *'!secret '* ]]; then
if [[ "${line}" == *"!secret "* ]]; then
echo "secret detected"
# Get argument
secret=${line#*secret }
# Remove trailing ' or "
secret="${secret%[\"\']}"
# Stop if secret file not mounted
if [[ "$SECRETSOURCE" == "false" ]]; then
bashio::log.warning "Homeassistant config not mounted, secrets are not supported"