mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
Update 01-config_yaml.sh
This commit is contained in:
@@ -56,7 +56,7 @@ shell_escape() { printf '%q' "$1"; }
|
|||||||
# Prints key=value from YAML, ignoring comments/underscored keys
|
# Prints key=value from YAML, ignoring comments/underscored keys
|
||||||
read_config() {
|
read_config() {
|
||||||
local file="$1"
|
local file="$1"
|
||||||
yq eval 'to_entries | .[] | select(.key|test("^[#_]")|not) | "\(.key)=\(.value)"' "$file" 2>/dev/null
|
yq eval 'to_entries | .[] | select(.key|test("^[#_]")|not) | "\(.key)=\"\(.value | @json)\""' "$file" 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
SECRETSFILE="/config/secrets.yaml"
|
SECRETSFILE="/config/secrets.yaml"
|
||||||
|
|||||||
Reference in New Issue
Block a user