mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-13 11:01:28 +02:00
Update 01-config_yaml.sh
This commit is contained in:
@@ -55,8 +55,8 @@ 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 | @json)\""' "$file" 2>/dev/null
|
yq eval 'to_entries | .[] | select(.key|test("^[#_]")|not) | "\(.key)=\(.value | @sh)"' "$file" 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
SECRETSFILE="/config/secrets.yaml"
|
SECRETSFILE="/config/secrets.yaml"
|
||||||
|
|||||||
Reference in New Issue
Block a user