#!/usr/bin/env bash

if [ "$script_type" == "up" ]; then
  route add -host $remote_1/32 gw $route_net_gateway
  route add -net 0.0.0.0/1 gw $route_vpn_gateway
  route add -net 128.0.0.0/1 gw $route_vpn_gateway
  /etc/openvpn/update-resolv-conf
elif [ "$script_type" == "down" ]; then
  /etc/openvpn/update-resolv-conf
  route del -host $remote_1/32 gw $route_net_gateway
fi

#!/usr/bin/env bash

if [ "$script_type" == "up" ]; then
  #route add -host $remote_1/32 gw $route_net_gateway
  #route add -net 0.0.0.0/1 gw $route_vpn_gateway
  #route add -net 128.0.0.0/1 gw $route_vpn_gateway
  /etc/openvpn/update-resolv-conf
elif [ "$script_type" == "down" ]; then
  /etc/openvpn/update-resolv-conf
  route del -host $remote_1/32 gw $route_net_gateway
fi

Remove duplicate routes from OpenVPN script
Remove duplicate routes from OpenVPN script

Signed-off-by: Anirudh <f14b33eed82097f3195471c86607f997fde77b88@pm.me>
