guix: vpn script

This commit is contained in:
Pavel Korytov 2024-02-16 12:13:20 +03:00
parent c216cbec9d
commit d5d092cbeb
2 changed files with 10 additions and 2 deletions

View file

@ -631,7 +631,11 @@ I'm using Mullvad VPN. The =~/.vpn= folder stores its OpenVPN config (=openvpn.o
#+begin_src sh :tangle ~/bin/scripts/vpn-fix-routes
echo "Adding default route to $route_vpn_gateway with /0 mask..."
if [ -f "/run/current-system/profile/sbin/ip" ]; then
IP=/run/current-system/profile/sbin/ip
else
IP=/usr/bin/ip
fi
$IP route add default via $route_vpn_gateway

View file

@ -2,7 +2,11 @@
# [[file:../../Guix.org::*OpenVPN][OpenVPN:9]]
echo "Adding default route to $route_vpn_gateway with /0 mask..."
if [ -f "/run/current-system/profile/sbin/ip" ]; then
IP=/run/current-system/profile/sbin/ip
else
IP=/usr/bin/ip
fi
$IP route add default via $route_vpn_gateway