update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
VERS='3.8.241-06272023'
|
||||
VERS='3.8.242-07012023'
|
||||
|
||||
MMFOLDER="/opt/idssys/mediamanager"
|
||||
TMPFOLDER="${MMFOLDER}/.tmp"
|
||||
|
||||
@@ -113,8 +113,9 @@ MMSTART(){
|
||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -en "${idsCL[LightCyan]}${msg}${spc} ${idsCL[White]}: ${idsCL[Default]}"
|
||||
|
||||
echo "REALWANIP=\"$(/usr/bin/dig +short +time=2 myip.opendns.com @208.67.222.222)\"" > ${TMPFOLDER}/realwanip
|
||||
source ${TMPFOLDER}/realwanip
|
||||
REALWANIP=$(dig +short txt ch whoami.cloudflare @1.0.0.1)
|
||||
REALWANIP=${REALWANIP//\"/}
|
||||
echo "REALWANIP=\"${REALWANIP}\"" > ${TMPFOLDER}/realwanip
|
||||
|
||||
"${VPN_START[@]}" >/dev/null 2>&1
|
||||
sleep 5s
|
||||
@@ -279,8 +280,9 @@ MMSTART(){
|
||||
mmip=""
|
||||
cc=0
|
||||
until [ "${REALWANIP}" != "" ] && [ "${mmip}" != "" ] && [[ "${REALWANIP}" != *"connection timed out"* ]] && [[ "${mmip}" != *"connection timed out"* ]]; do
|
||||
# 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=$(dig +short txt ch whoami.cloudflare @1.0.0.1)
|
||||
mmip=${mmip//\"/}
|
||||
if [ ${cc} -eq 10 ]; then
|
||||
echo
|
||||
echo -e "${idsCL[Red]}Cannot get an WAN address, restarting system!${idsCL[Default]}"
|
||||
@@ -699,7 +701,9 @@ MMSTATUS(){
|
||||
echo -en "${idsCL[White]}${msg}${spc}${idsCL[White]} : ${idsCL[Default]}"
|
||||
|
||||
# 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=$(dig +short txt ch whoami.cloudflare @1.0.0.1)
|
||||
mmip=${mmip//\"/}
|
||||
if [ "${REALWANIP}" != "${mmip}" ]; then
|
||||
echo -e "${idsCL[Green]}Good${idsCL[Default]}"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user