mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-10 11:13:04 +03:00
16 lines
442 B
Bash
Executable file
16 lines
442 B
Bash
Executable file
#!/bin/sh
|
|
# [[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
|
|
|
|
echo "Removing /1 routes..."
|
|
$IP route del 0.0.0.0/1 via $route_vpn_gateway
|
|
$IP route del 128.0.0.0/1 via $route_vpn_gateway
|
|
# OpenVPN:9 ends here
|