Update 00-global_var.sh

This commit is contained in:
Alexandre authored and GitHub committed 2023-02-26 13:38:08 +01:00
1 parent 6d60883bf2
commit f1baf6b75e
1 file changed
+5 -1
+5 -1
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