Update mm-scripts.sh

This commit is contained in:
2023-02-23 20:41:10 -06:00
parent 98df4a1e83
commit 8ee87e2436

View File

@@ -374,12 +374,12 @@ MMSTATUS(){
if [[ ${srvc} == *"vpn"* ]] || [[ ${srvc} == *"wireguard"* ]]; then
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
echo -e "${idsCL[Green]}Matches 0.0.0.0 route${idsCL[Default]}"
echo -e " |- 0.0.0.0 gateway : ${idsCL[Green]}$zerogw${idsCL[Default]}"
echo -en " |- DEFAULT gateway : "
if [ "${zerogw}" == "${defaultgw}" ] && [ "${zerogw}" == "wg-torguard" ]; then
echo -e "${idsCL[Green]}$defaultgw${idsCL[Default]}"
else
echo -e "${idsCL[Red]}Does not match 0.0.0.0 route${idsCL[Default]}"
echo -e "${idsCL[Red]}Not correct${idsCL[Default]}"
if [ ! -f /opt/idssys/mediamanager/mm.stop ]; then
echo
echo -e "${idsCL[LightCyan]}Restarting system...${idsCL[Default]}"