use -n
This commit is contained in:
parent
bc99dfb126
commit
17ff670104
@ -10,22 +10,23 @@ echo "VPN_IPV4_ADDRESS=${VPN_IPV4_ADDRESS}"
|
|||||||
echo "VPN_IPV6_ADDRESS=${VPN_IPV6_ADDRESS}"
|
echo "VPN_IPV6_ADDRESS=${VPN_IPV6_ADDRESS}"
|
||||||
|
|
||||||
echo "-- <end> inner_basic.sh --"
|
echo "-- <end> inner_basic.sh --"
|
||||||
if [ -z "${VPN_IPV4_ADDRESS}" ]
|
|
||||||
|
if [ -n "${VPN_IPV4_ADDRESS}" ]
|
||||||
then
|
then
|
||||||
ip addr add ${VPN_IPV4_ADDRESS} dev vpn
|
ip addr add ${VPN_IPV4_ADDRESS} dev vpn
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${VPN_IPV6_ADDRESS}" ]
|
if [ -n "${VPN_IPV6_ADDRESS}" ]
|
||||||
then
|
then
|
||||||
ip addr add ${VPN_IPV6_ADDRESS} dev vpn
|
ip addr add ${VPN_IPV6_ADDRESS} dev vpn
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${VPN_IPV4_ADDRESS}" ]
|
if [ -n "${VPN_IPV4_ADDRESS}" ]
|
||||||
then
|
then
|
||||||
ip -4 route add default dev vpn
|
ip -4 route add default dev vpn
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${VPN_IPV6_ADDRESS}" ]
|
if [ -n "${VPN_IPV6_ADDRESS}" ]
|
||||||
then
|
then
|
||||||
ip -6 route add default dev vpn
|
ip -6 route add default dev vpn
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user