From 9d49649ae32628a601cfc32bb811d7d5699dafc9 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 23 Nov 2023 13:31:10 +0100 Subject: [PATCH] Update 00-global_var.sh --- .templates/00-global_var.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.templates/00-global_var.sh b/.templates/00-global_var.sh index d538ccc97..57024525b 100755 --- a/.templates/00-global_var.sh +++ b/.templates/00-global_var.sh @@ -41,18 +41,18 @@ for KEYS in "${arr[@]}"; do ###################################### # Export the variable to run scripts # ###################################### - export "${KEYS}='${VALUE}'" + export "$line" # set .env - echo "$KEYS=\"$VALUE\"" >> /.env || true + echo "$line" >> /.env || true # set /etc/environment mkdir -p /etc - echo "$KEYS=$VALUE" >> /etc/environment + echo "$line" >> /etc/environment # For non s6 if cat /etc/services.d/*/*run* &>/dev/null; then sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null; fi if cat /etc/cont-init.d/*run* &>/dev/null; then sed -i "1a export $line" /etc/cont-init.d/*run* 2>/dev/null; fi # For s6 if [ -d /var/run/s6/container_environment ]; then printf "%s" "${VALUE}" > /var/run/s6/container_environment/"${KEYS}"; fi - echo "export ${KEYS}=\"${VALUE}\"" >> ~/.bashrc + echo "export ${KEYS}='${VALUE}'" >> ~/.bashrc done