Update mm-scripts.sh
This commit is contained in:
@@ -230,11 +230,13 @@ MMSTART(){
|
||||
defaultgw=$(/bin/ip route show | grep default | cut -d' ' -f 3)
|
||||
if [ "${zerogw}" == "${defaultgw}" ] && [ "${defaultgw}" == "${VPN_INTERFACE}" ]; then
|
||||
checked=""
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
|
||||
elif [ ${cc} -ge 2 ] && [ "${zerogw}" == "${VPN_INTERFACE}" ] && [ "${defaultgw}" != "${VPN_INTERFACE}" ]; then
|
||||
elif [ ${cc} -eq 1 ] && [ "${zerogw}" == "${VPN_INTERFACE}" ] && [ "${defaultgw}" != "${VPN_INTERFACE}" ]; then
|
||||
/bin/ip route del default
|
||||
/bin/ip route add default dev ${VPN_INTERFACE}
|
||||
SENDNOTICE "MM FIX" "Default route failure, default route re-added"
|
||||
echo -en "Fixing... "
|
||||
|
||||
elif [ ${cc} -eq 10 ]; then
|
||||
echo -e "${idsCL[Red]}Could not confirm default routes, restarting system!${idsCL[Default]}"
|
||||
@@ -258,7 +260,6 @@ MMSTART(){
|
||||
sleep 1s
|
||||
|
||||
done
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
|
||||
msg="Verifying traffic routing through VPN"
|
||||
c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
|
||||
|
||||
Reference in New Issue
Block a user