Update mm-scripts.sh
This commit is contained in:
@@ -73,6 +73,7 @@ MMSTART(){
|
|||||||
else
|
else
|
||||||
|
|
||||||
if [ "$(ip route show | grep 0.0.0.0 | cut -d' ' -f 3)" != "$(ip route show | grep default | cut -d' ' -f 3)" ]; then
|
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 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)
|
/bin/ip route add default via $(ip route show | grep 0.0.0.0 | cut -d' ' -f 3)
|
||||||
fi
|
fi
|
||||||
@@ -112,6 +113,7 @@ MMSTART(){
|
|||||||
else
|
else
|
||||||
echo -e "${idsCL[Red]}Traffic is not routing through VPN, restarting system!${idsCL[Default]}"
|
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
|
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
|
MMSTOP
|
||||||
sleep 1m
|
sleep 1m
|
||||||
"${VPN_START[@]}"
|
"${VPN_START[@]}"
|
||||||
|
|||||||
Reference in New Issue
Block a user