Update 00-aab.sh

This commit is contained in:
Alexandre
2021-11-16 23:43:13 +01:00
committed by GitHub
parent 9d553be7f8
commit 3292dc2705

View File

@@ -1,14 +1,14 @@
#!/bin/bash #!/bin/bash
########################## ###################################
# Read all addon options # # Export all addon options as env #
########################## ###################################
# For all keys in options.json # For all keys in options.json
JSONSOURCE="/data/options.json" JSONSOURCE="/data/options.json"
mapfile -t arr < <(jq -r 'keys[]' ${JSONSOURCE})
# Export keys as env variables # Export keys as env variables
mapfile -t arr < <(jq -r 'keys[]' ${JSONSOURCE})
for KEYS in ${arr[@]}; do for KEYS in ${arr[@]}; do
# export key # export key
export $(echo "${KEYS}=$(jq .$KEYS ${JSONSOURCE})") export $(echo "${KEYS}=$(jq .$KEYS ${JSONSOURCE})")