Update mm-scripts.sh

This commit is contained in:
2023-04-27 08:00:32 -05:00
parent 63bd053f1c
commit b38706dc8c

View File

@@ -153,7 +153,7 @@ MMSTART(){
fi
vpnuptime=$(expr `date +%s` - $(stat -c %Y ${MMFOLDER}/vpninfo))
if [ ${vpnuptime} -ge 86400 ]; then
if [ ${vpnuptime} -ge 200 ]; then
echo "$(date) - 24hr session limit reached, restarting vpn & services" >> $logfile
echo -en "${idsCL[LightCyan]}24hr session limit reached, restarting vpn & services ."
[ -f ${MMFOLDER}/mm.noservices ] && rv="vpn" || rv=""
@@ -167,6 +167,7 @@ MMSTART(){
echo -en "."
MMSTART start ${rv} >/dev/null 2>&1
echo -e " ${idsCL[Green]}Done${idsCL[Default]}"
exit 0
fi
zerogw=$(/sbin/ip route show | grep 0.0.0.0 | cut -d' ' -f 3)
@@ -1347,7 +1348,7 @@ if [ ! -f ${MMFOLDER}/mm.update.stop ]; then
fi
[ -f ${MMFOLDER}/mm.noservices ] && rv="vpn" || rv=""
MMSTOP
echo -en "${idsCL[LightCyan]}Pausing for 30s to get new VPN WAN IP, or press any key to continue with possibly getting a new address ... ${idsCL[Default]}"
echo -en "${idsCL[LightCyan]}Pausing for 30s to ensure a new VPN WAN IP, or press any key to continue with potentially getting a new address ... ${idsCL[Default]}"
read -et 30 -n 1
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
MMSTART ${action} ${rv}