diff --git a/enedisgateway2mqtt_dev/rootfs/scripts/00-global_var.sh b/enedisgateway2mqtt_dev/rootfs/scripts/00-global_var.sh index dc39300ec..b68e3f08b 100644 --- a/enedisgateway2mqtt_dev/rootfs/scripts/00-global_var.sh +++ b/enedisgateway2mqtt_dev/rootfs/scripts/00-global_var.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/with-contenv bashio ################################### # Export all addon options as env # @@ -16,7 +16,7 @@ for KEYS in "${arr[@]}"; do line="${KEYS}=${VALUE//[\"\']/}" # Use locally if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi - export line + export $line # Export the variable to run scripts line="${KEYS}=${VALUE//[\"\']/} &>/dev/null" sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null || sed -i "1a export $line" /scripts/*run*