Update mm-scripts.sh

This commit is contained in:
2022-06-04 19:31:14 -05:00
parent d2306cf651
commit a7d013eaf7

View File

@@ -73,6 +73,7 @@ MMSTART(){
else
if [ "$(ip route show | grep 0.0.0.0 | cut -d' ' -f 3)" != "$(ip route show | grep default | cut -d' ' -f 3)" ]; then
[ $VERBOSE = true ] && echo "$(date) - Adding default routes" >> $logfile
/bin/ip route del default via 10.10.0.1
/bin/ip route add default via $(ip route show | grep 0.0.0.0 | cut -d' ' -f 3)
fi
@@ -112,6 +113,7 @@ MMSTART(){
else
echo -e "${idsCL[Red]}Traffic is not routing through VPN, restarting system!${idsCL[Default]}"
echo "$(date) - Traffic is not routing through VPN, restarting system scip(${scip}) mmip(${mmip})" >> $logfile
[ $VERBOSE = true ] && echo "$(date) - Default Routes: zerogw(${zerogw}) defaultgw(${defaultgw})" >> $logfile
MMSTOP
sleep 1m
"${VPN_START[@]}"