Update mm-scripts.sh
This commit is contained in:
@@ -104,7 +104,7 @@ MMSTART(){
|
|||||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||||
echo -en "${idsCL[LightCyan]}${msg}${spc} ${idsCL[White]}: ${idsCL[Default]}"
|
echo -en "${idsCL[LightCyan]}${msg}${spc} ${idsCL[White]}: ${idsCL[Default]}"
|
||||||
|
|
||||||
REALWANIP=$(curl -s https://api.ipify.org)
|
REALWANIP=$(curl -s http://whatismyip.akamai.com)
|
||||||
echo "REALWANIP=\"${REALWANIP}\"" > ${TMPFOLDER}/realwanip
|
echo "REALWANIP=\"${REALWANIP}\"" > ${TMPFOLDER}/realwanip
|
||||||
|
|
||||||
"${VPN_START[@]}" >/dev/null 2>&1
|
"${VPN_START[@]}" >/dev/null 2>&1
|
||||||
@@ -290,7 +290,7 @@ MMSTART(){
|
|||||||
cc=0
|
cc=0
|
||||||
until [ "${REALWANIP}" != "" ] && [ "${mmip}" != "" ] && [[ "${REALWANIP}" != *"connection timed out"* ]] && [[ "${mmip}" != *"connection timed out"* ]]; do
|
until [ "${REALWANIP}" != "" ] && [ "${mmip}" != "" ] && [[ "${REALWANIP}" != *"connection timed out"* ]] && [[ "${mmip}" != *"connection timed out"* ]]; do
|
||||||
# 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=$(curl -s https://api.ipify.org)
|
mmip=$(curl -s http://whatismyip.akamai.com)
|
||||||
if [ ${cc} -eq 10 ]; then
|
if [ ${cc} -eq 10 ]; 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]}"
|
||||||
@@ -724,7 +724,7 @@ MMSTATUS(){
|
|||||||
|
|
||||||
# mmip=$(/usr/bin/dig +short myip.opendns.com @resolver1.opendns.com)
|
# mmip=$(/usr/bin/dig +short myip.opendns.com @resolver1.opendns.com)
|
||||||
# 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=$(curl -s https://api.ipify.org)
|
mmip=$(curl -s http://whatismyip.akamai.com)
|
||||||
if [ "${REALWANIP}" != "${mmip}" ] && [[ "${mmip}" != *"timed out"* ]]; then
|
if [ "${REALWANIP}" != "${mmip}" ] && [[ "${mmip}" != *"timed out"* ]]; then
|
||||||
echo -e "${idsCL[Green]}Good${idsCL[Default]}"
|
echo -e "${idsCL[Green]}Good${idsCL[Default]}"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user