diff --git a/Guix.org b/Guix.org index 0ec9a4b..7267c6d 100644 --- a/Guix.org +++ b/Guix.org @@ -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..." - IP=/run/current-system/profile/sbin/ip + 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 diff --git a/bin/scripts/vpn-fix-routes b/bin/scripts/vpn-fix-routes index 786cada..63f9abe 100755 --- a/bin/scripts/vpn-fix-routes +++ b/bin/scripts/vpn-fix-routes @@ -2,7 +2,11 @@ # [[file:../../Guix.org::*OpenVPN][OpenVPN:9]] echo "Adding default route to $route_vpn_gateway with /0 mask..." -IP=/run/current-system/profile/sbin/ip +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