Update mm-scripts.sh

This commit is contained in:
2022-04-18 21:02:34 -05:00
parent c96393d822
commit 68c51d5f54

View File

@@ -150,6 +150,7 @@ MMSTATUS(){
# fi
statusArray=(nordvpn openvpn)
statusArray+=(${SERVICES_CHECK[@]})
echo
for srvc in "${statusArray[@]}"; do
c=0; cw=36 spc=''
spc1=$((${cw}-${#NM_SERVICES[${srvc}]}))
@@ -176,7 +177,12 @@ MMSTATUS(){
zerogw=$(netstat -r | grep '0.0.0.0' | head -1 | awk '{ print $2}')
defaultgw=$(netstat -r | grep 'default' | head -1 | awk '{ print $2}')
echo -e " -- 0.0.0.0 gateway --> (${zerogw})"
echo -e " -- DEFAULT gateway --> (${defaultgw})"
echo -en " -- DEFAULT gateway --> (${defaultgw}) : "
if [ "${zerogw}" = "${defaultgw}" ]; then
echo -e "${idsCL[Green]}Matches${idsCL[Default]}"
else
echo -e "${idsCL[Red]}Does not match${idsCL[Default]}"
fi
fi
fi
fi