update
This commit is contained in:
@@ -7,6 +7,11 @@ MMSRV=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1)
|
||||
|
||||
noheader=' check noup stop '
|
||||
|
||||
logfile=${MMFOLDER}/logs/logfile
|
||||
outputlogfile=${MMFOLDER}/logs/outputs.check.log
|
||||
[ ! -f ${logfile} ] && touch $logfile
|
||||
[ ! -f ${outputlogfile} ] && touch $outputlogfile
|
||||
|
||||
declare -A NM_SERVICES
|
||||
NM_SERVICES['openvpn']='OpenVPN (TorGuard VPN Tunnel)'
|
||||
NM_SERVICES['wireguard']='WireGuard (TorGuard VPN Tunnel)'
|
||||
|
||||
@@ -25,10 +25,6 @@ if [ "${action}" != "check" ] && [ "${action}" != "update" ] && [ "${2}" != "nou
|
||||
DIVIDER . lightGreen
|
||||
fi
|
||||
|
||||
logfile=${MMFOLDER}/logfile
|
||||
|
||||
touch $logfile
|
||||
|
||||
IFS=,
|
||||
SERVICES_CHECK=(${SERVICESCHECK})
|
||||
unset IFS
|
||||
@@ -135,7 +131,7 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf
|
||||
SENDNOTICE "VPN Failure" "1st Failure, will try and restart the VPN" 1
|
||||
touch ${MMFOLDER}/mm.vpn.fail
|
||||
MMSTOP
|
||||
sleep 30s
|
||||
sleep 10s
|
||||
# "${VPN_START[@]}" >/dev/null 2>&1
|
||||
# sleep 10s
|
||||
rm -f ${MMFOLDER}/mm.stop*
|
||||
@@ -181,7 +177,7 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf
|
||||
SENDNOTICE "Network Failure" "Default route failure, will try and restart the VPN" 1
|
||||
touch ${MMFOLDER}/mm.vpn.fail
|
||||
MMSTOP
|
||||
sleep 30s
|
||||
sleep 10s
|
||||
# "${VPN_START[@]}" >/dev/null 2>&1
|
||||
# sleep 10s
|
||||
rm -f ${MMFOLDER}/mm.stop*
|
||||
@@ -212,7 +208,7 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf
|
||||
SENDNOTICE "Network Failure" "Cannot get an WAN address, will try and restart the VPN" 1
|
||||
touch ${MMFOLDER}/mm.vpn.fail
|
||||
MMSTOP >/dev/null 2>&1
|
||||
sleep 30s
|
||||
sleep 10s
|
||||
# "${VPN_START[@]}" >/dev/null 2>&1
|
||||
# sleep 10s
|
||||
rm -f ${MMFOLDER}/mm.stop*
|
||||
@@ -232,7 +228,7 @@ PersistentKeepalive = 25" >> /etc/wireguard/${VPN_INTERFACE}.conf
|
||||
SENDNOTICE "Network Failure" "Traffic route failure, will try and restart the VPN" 1
|
||||
touch ${MMFOLDER}/mm.vpn.fail
|
||||
MMSTOP
|
||||
sleep 30s
|
||||
sleep 10s
|
||||
# "${VPN_START[@]}" >/dev/null 2>&1
|
||||
# sleep 10s
|
||||
rm -f ${MMFOLDER}/mm.stop*
|
||||
|
||||
Reference in New Issue
Block a user