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