From 0f6e9463e42e4ce31105d1e4100111445acaf35a Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Mon, 28 Dec 2020 19:29:30 -0500 Subject: [PATCH] global environment variables --- scripts/env/setup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/env/setup.sh b/scripts/env/setup.sh index c760e29..9775c09 100755 --- a/scripts/env/setup.sh +++ b/scripts/env/setup.sh @@ -68,7 +68,11 @@ while [[ -z "$iface" ]]; do iface=$(ip -o -4 route show to default | egrep -o 'dev [^ ]*' | awk 'NR==1{print $2}' | tr -d '[:space:]') done +GLOBAL_ENV=/opt/mistborn/.envs/.production/.global +install -Dv /dev/null $GLOBAL_ENV +echo "DIFACE=$iface" >> $GLOBAL_ENV + # default interface -sudo find /etc/systemd/system/ -type f -name 'Mistborn*' | xargs sudo sed -i "s/DIFACE/$iface/" +#sudo find /etc/systemd/system/ -type f -name 'Mistborn*' | xargs sudo sed -i "s/DIFACE/$iface/" sudo systemctl daemon-reload