diff --git a/src/configure-balena-host-envvars.sh b/src/configure-balena-host-envvars.sh index d3b000e4..b81c24e4 100755 --- a/src/configure-balena-host-envvars.sh +++ b/src/configure-balena-host-envvars.sh @@ -36,10 +36,9 @@ HOST_ENVVARS[BALENA_SENTRY_URL_HOST]=sentry HOST_ENVVARS[BALENA_MONITOR_HOST]=monitor # Go through the lists and fill in any missing envvars -#for index in $(seq 1 ${#HOST_ENVVARS[*]}); do for VARNAME in "${!HOST_ENVVARS[@]}"; do - VARVALUE="${HOST_ENVVARS[$VARNAME]}" - if [[ ! -z "$VARVALUE" ]]; then + VARVALUE=${!VARNAME} + if [[ -z "$VARVALUE" ]]; then # Only use BALENA_DEVICE_UUID if it actually exists, else just use the # full passed in TLD DEVICE=""