From f8e3d0b6d785ee6f0a372ea56a9d2a2f9fb575a1 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 18 Nov 2021 16:55:38 +0100 Subject: [PATCH] Update entrypoint.sh --- gazpar2mqtt/rootfs/entrypoint.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gazpar2mqtt/rootfs/entrypoint.sh b/gazpar2mqtt/rootfs/entrypoint.sh index dd05edcca..2529ca5f2 100644 --- a/gazpar2mqtt/rootfs/entrypoint.sh +++ b/gazpar2mqtt/rootfs/entrypoint.sh @@ -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 # ################