Update mm-scripts.sh
This commit is contained in:
@@ -349,8 +349,12 @@ MMSTATUS(){
|
|||||||
else
|
else
|
||||||
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
|
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
|
||||||
if [[ ${srvc} == *"vpn"* ]]; then
|
if [[ ${srvc} == *"vpn"* ]]; then
|
||||||
zerogw=$(netstat -rn | grep '0.0.0.0' | head -1 | awk '{ print $2}')
|
# zerogw=$(netstat -rn | grep '0.0.0.0' | head -1 | awk '{ print $2}')
|
||||||
defaultgw=$(netstat -rn | grep 'default' | 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 -e " |- 0.0.0.0 gateway --> (${zerogw})"
|
||||||
echo -en " |- DEFAULT gateway --> (${defaultgw}) : "
|
echo -en " |- DEFAULT gateway --> (${defaultgw}) : "
|
||||||
if [ "${zerogw}" = "${defaultgw}" ]; then
|
if [ "${zerogw}" = "${defaultgw}" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user