Update 00-global_var.sh

This commit is contained in:
Alexandre
2023-02-26 13:38:08 +01:00
committed by GitHub
parent 6d60883bf2
commit f1baf6b75e

View File

@@ -41,7 +41,11 @@ for KEYS in "${arr[@]}"; do
# Export the variable to run scripts #
######################################
export "${KEYS}='${VALUE}'"
# set .env
echo "$KEYS=$VALUE" >> /.env || true
# set /etc/environmemt
mkdir -p /etc
echo "$KEYS=$VALUE" >> /etc/environmemt
# 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