Update mm-scripts.sh

This commit is contained in:
2022-05-12 20:32:42 -05:00
parent 7ae052ca2c
commit 5b380c9c65

View File

@@ -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