mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-10 11:13:04 +03:00
guix: vpn script
This commit is contained in:
parent
c216cbec9d
commit
d5d092cbeb
2 changed files with 10 additions and 2 deletions
4
Guix.org
4
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..."
|
||||
|
||||
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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue