update
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
VERS='3.9.63-11082023'
|
VERS='3.9.64-11082023'
|
||||||
|
|
||||||
MMFOLDER="/opt/idssys/mediamanager"
|
MMFOLDER="/opt/idssys/mediamanager"
|
||||||
TMPFOLDER="${MMFOLDER}/.tmp"
|
TMPFOLDER="${MMFOLDER}/.tmp"
|
||||||
@@ -117,9 +117,9 @@ else #default wireguard
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
DEBUGLOGSTOP(){
|
DEBUGLOGSTOP(){
|
||||||
chktmend=`date +%s`
|
# chktmend=`date +%s`
|
||||||
chktm=$((chktmend-chktmstart))
|
# chktm=$((chktmend-chktmstart))
|
||||||
echo "$(date) - ${mmsv} Runtime: ${chktm}s" >> ${MM_LOGFILE}
|
# echo "$(date) - ${mmsv} Runtime: ${chktm}s" >> ${MM_LOGFILE}
|
||||||
}
|
}
|
||||||
|
|
||||||
MMUPDATECHECK(){
|
MMUPDATECHECK(){
|
||||||
|
|||||||
@@ -95,9 +95,8 @@ MMSTART(){
|
|||||||
mmsv='Starting'
|
mmsv='Starting'
|
||||||
echo
|
echo
|
||||||
OUT=$(/bin/ip link | grep "${VPN_INTERFACE}")
|
OUT=$(/bin/ip link | grep "${VPN_INTERFACE}")
|
||||||
echo "$(date) - ${mmsv} VPN..." >> ${MM_LOGFILE}
|
|
||||||
if [ ${#OUT} = 0 ]; then
|
if [ ${#OUT} = 0 ]; then
|
||||||
|
echo "$(date) - ${mmsv} VPN..." >> ${MM_LOGFILE}
|
||||||
msg="Setting up the VPN Tunnel config"
|
msg="Setting up the VPN Tunnel config"
|
||||||
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
|
||||||
@@ -296,7 +295,7 @@ MMSTART(){
|
|||||||
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}
|
||||||
[ $VERBOSE = true ] && echo "$(date) - Default Routes: zerogw(${zerogw}) defaultgw(${defaultgw})" >> ${MM_LOGFILE}
|
# [ $VERBOSE = true ] && echo "$(date) - Default Routes: zerogw(${zerogw}) defaultgw(${defaultgw})" >> ${MM_LOGFILE}
|
||||||
SENDNOTICE "Network Failure" "Cannot get an WAN address, will try and restart the VPN" 1
|
SENDNOTICE "Network Failure" "Cannot get an WAN address, will try and restart the VPN" 1
|
||||||
touch ${TMPFOLDER}/mm.vpn.fail
|
touch ${TMPFOLDER}/mm.vpn.fail
|
||||||
MMSTOP >/dev/null 2>&1
|
MMSTOP >/dev/null 2>&1
|
||||||
|
|||||||
Reference in New Issue
Block a user