Update mm-scripts.sh
This commit is contained in:
@@ -102,9 +102,12 @@ MMSTART(){
|
|||||||
checked=""
|
checked=""
|
||||||
fi
|
fi
|
||||||
if [ "${checked}" == "false" ] && [ ${cc} -eq 10 ]; then
|
if [ "${checked}" == "false" ] && [ ${cc} -eq 10 ]; then
|
||||||
echo -e "${idsCL[Red]}Could not confirm default routes, shutting down!${idsCL[Default]}"
|
echo -e "${idsCL[Red]}Could not confirm default routes, restarting system!${idsCL[Default]}"
|
||||||
echo "$(date) - Could not confirm default routes, shutting down" >> $logfile
|
echo "$(date) - Could not confirm default routes, restarting system" >> $logfile
|
||||||
MMSTOP
|
MMSTOP
|
||||||
|
sleep 1m
|
||||||
|
"${VPN_START[@]}"
|
||||||
|
rm -f /opt/mm.stop
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
((cc=${cc}+1))
|
((cc=${cc}+1))
|
||||||
@@ -119,9 +122,12 @@ MMSTART(){
|
|||||||
if [ "${scip}" != "${mmip}" ]; then
|
if [ "${scip}" != "${mmip}" ]; then
|
||||||
echo -e "${idsCL[Green]} done${idsCL[Default]}"
|
echo -e "${idsCL[Green]} done${idsCL[Default]}"
|
||||||
else
|
else
|
||||||
echo -e "${idsCL[Red]}Traffic is not routing through VPN!${idsCL[Default]}"
|
echo -e "${idsCL[Red]}Traffic is not routing through VPN, restarting system!${idsCL[Default]}"
|
||||||
echo "$(date) - Traffic is not routing through VPN, shutting down" >> $logfile
|
echo "$(date) - Traffic is not routing through VPN, restarting system" >> $logfile
|
||||||
MMSTOP
|
MMSTOP
|
||||||
|
sleep 1m
|
||||||
|
"${VPN_START[@]}"
|
||||||
|
rm -f /opt/mm.stop
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user