This commit is contained in:
2023-03-24 21:01:29 -05:00
parent 77fee3644e
commit dff703b1e2
2 changed files with 9 additions and 8 deletions

View File

@@ -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)'

View File

@@ -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*