From 89d644be6c319f412319b763a3ce71eba4cc4bcf Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 14 Jan 2022 18:46:22 +0100 Subject: [PATCH] Update 00-global_var.sh --- zzz_templates/00-global_var.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zzz_templates/00-global_var.sh b/zzz_templates/00-global_var.sh index 0d845ccef..1798293bd 100644 --- a/zzz_templates/00-global_var.sh +++ b/zzz_templates/00-global_var.sh @@ -10,9 +10,9 @@ 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 +for KEYS in "${arr[@]}"; do # export key - VALUE=$(jq .$KEYS ${JSONSOURCE}) + VALUE=$(jq ."$KEYS" ${JSONSOURCE}) line="${KEYS}=${VALUE//[\"\']/}" # Use locally if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi @@ -26,8 +26,8 @@ done # Set timezone # ################ if [ ! -z "TZ" ] && [ -f /etc/localtime ]; then - if [ -f /usr/share/zoneinfo/$TZ ]; then + if [ -f /usr/share/zoneinfo/"$TZ" ]; then echo "Timezone set from $(cat /etc/timezone) to $TZ" - ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ >/etc/timezone + ln -snf /usr/share/zoneinfo/"$TZ" /etc/localtime && echo "$TZ" >/etc/timezone fi fi