Update mm-scripts.sh

This commit is contained in:
2023-01-28 00:04:05 -06:00
parent 085bedd377
commit 1bf05c72c5

View File

@@ -351,10 +351,8 @@ MMSTATUS(){
if [[ ${srvc} == *"vpn"* ]]; then
# zerogw=$(netstat -rn | grep '0.0.0.0' | head -1 | awk '{ print $2}')
# defaultgw=$(netstat -rn | grep 'default' | head -1 | awk '{ print $2}')
zerogw=$(ip route show | grep 0.0.0.0 | cut -d' ' -f 3)
defaultgw=$(ip route show | grep default | cut -d' ' -f 3)
echo -e " |- 0.0.0.0 gateway --> (${zerogw})"
echo -en " |- DEFAULT gateway --> (${defaultgw}) : "
if [ "${zerogw}" = "${defaultgw}" ]; then