From 4c076c97ae051363e75617cf7168d6522d1d1e04 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 4 Jun 2022 17:04:03 -0500 Subject: [PATCH] Update mm-scripts.sh --- mm-scripts.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/mm-scripts.sh b/mm-scripts.sh index 84d6755..e4c01b0 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -102,9 +102,12 @@ MMSTART(){ checked="" fi if [ "${checked}" == "false" ] && [ ${cc} -eq 10 ]; then - echo -e "${idsCL[Red]}Could not confirm default routes, shutting down!${idsCL[Default]}" - echo "$(date) - Could not confirm default routes, shutting down" >> $logfile + echo -e "${idsCL[Red]}Could not confirm default routes, restarting system!${idsCL[Default]}" + echo "$(date) - Could not confirm default routes, restarting system" >> $logfile MMSTOP + sleep 1m + "${VPN_START[@]}" + rm -f /opt/mm.stop exit 1 fi ((cc=${cc}+1)) @@ -119,9 +122,12 @@ MMSTART(){ if [ "${scip}" != "${mmip}" ]; then echo -e "${idsCL[Green]} done${idsCL[Default]}" else - echo -e "${idsCL[Red]}Traffic is not routing through VPN!${idsCL[Default]}" - echo "$(date) - Traffic is not routing through VPN, shutting down" >> $logfile + echo -e "${idsCL[Red]}Traffic is not routing through VPN, restarting system!${idsCL[Default]}" + echo "$(date) - Traffic is not routing through VPN, restarting system" >> $logfile MMSTOP + sleep 1m + "${VPN_START[@]}" + rm -f /opt/mm.stop exit 1 fi