Update entrypoint.sh

This commit is contained in:
Alexandre
2021-11-18 16:55:38 +01:00
committed by GitHub
parent 1a165659ac
commit f8e3d0b6d7

View File

@@ -9,14 +9,18 @@ echo "Starting..."
# For all keys in options.json
JSONSOURCE="/data/options.json"
# Export keys as env variables
echo "All addon options were exported as variables"
mapfile -t arr < <(jq -r 'keys[]' ${JSONSOURCE})
for KEYS in ${arr[@]}; do
# export key
VALUE=$(jq .$KEYS ${JSONSOURCE})
export ${KEYS}=${VALUE:1:-1}
export $(echo "${KEYS}=$(jq .$KEYS ${JSONSOURCE})")
done
################
# Set timezone #
################