diff --git a/mm-scripts.sh b/mm-scripts.sh index ca922da..be22297 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -69,7 +69,7 @@ MMSTART(){ #OUT=`ip a show $VPN_INTERFACE up` >/dev/null 2>&1 if [ ${#OUT} -ne 0 ]; then - if [ "$(ip route show | grep 0.0.0.0 | cut -d' ' -f 3)" -ne "$(ip route show | grep default | cut -d' ' -f 3)" ]; then + if [ "$(ip route show | grep 0.0.0.0 | cut -d' ' -f 3)" != "$(ip route show | grep default | cut -d' ' -f 3)" ]; then /bin/ip route del default via 10.10.0.1 /bin/ip route add default via $(ip route show | grep 0.0.0.0 | cut -d' ' -f 3) fi