update global var

This commit is contained in:
Alexandre
2021-12-07 15:30:32 +01:00
parent 3c2dda950c
commit 1fa715e70a
3 changed files with 12 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/with-contenv bashio
###################################
# Export all addon options as env #
@@ -15,6 +15,7 @@ for KEYS in ${arr[@]}; do
VALUE=$(jq .$KEYS ${JSONSOURCE})
line="${KEYS}=${VALUE//[\"\']/}"
# Use locally
bashio::log.blue "$line" 2>/dev/null || echo "$line"
export $line
# Export the variable to run scripts
line="${KEYS}=${VALUE//[\"\']/} &>/dev/null"