Update mm-scripts.sh

This commit is contained in:
2025-03-16 22:00:07 -05:00
parent ee0a4feb9e
commit 05842f3513

View File

@@ -281,6 +281,7 @@ MMSTART(){
done done
msg="Verifying traffic routing through VPN" msg="Verifying traffic routing through VPN"
c=0; spc=''; spc1=$((${cw_spc}-${#msg})) c=0; spc=''; spc1=$((${cw_spc}-${#msg}))
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
@@ -292,7 +293,8 @@ MMSTART(){
# mmip=$(/usr/bin/dig +short +time=2 myip.opendns.com @208.67.222.222) # mmip=$(/usr/bin/dig +short +time=2 myip.opendns.com @208.67.222.222)
mmip=$(dig +short txt ch whoami.cloudflare @1.0.0.1) mmip=$(dig +short txt ch whoami.cloudflare @1.0.0.1)
mmip=${mmip//\"/} mmip=${mmip//\"/}
if [ ${cc} -eq 10 ]; then echo "(${mmip}) (${REALWANIP})"
if [ ${cc} -eq 20 ]; then
echo echo
echo -e "${idsCL[Red]}Cannot get an WAN address, restarting system!${idsCL[Default]}" echo -e "${idsCL[Red]}Cannot get an WAN address, restarting system!${idsCL[Default]}"
echo "$(date) - Cannot get an WAN address, restarting system! wanip(${REALWANIP}) vpnip(${mmip})" >> ${MM_LOGFILE} echo "$(date) - Cannot get an WAN address, restarting system! wanip(${REALWANIP}) vpnip(${mmip})" >> ${MM_LOGFILE}