global environment variables

This commit is contained in:
Steven Foerster
2020-12-28 19:29:30 -05:00
parent b9dfb30084
commit 0f6e9463e4
+5 -1
View File
@@ -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:]') iface=$(ip -o -4 route show to default | egrep -o 'dev [^ ]*' | awk 'NR==1{print $2}' | tr -d '[:space:]')
done done
GLOBAL_ENV=/opt/mistborn/.envs/.production/.global
install -Dv /dev/null $GLOBAL_ENV
echo "DIFACE=$iface" >> $GLOBAL_ENV
# default interface # 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 sudo systemctl daemon-reload