Create 00-aab.sh

This commit is contained in:
Alexandre
2021-11-16 23:37:01 +01:00
committed by GitHub
parent 0cc7e77e14
commit efc881a434

View File

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