Revert "Update HealthCheck for auto-recover TUN down (#1373)"

This reverts commit 2287ee9cc4.
This commit is contained in:
Kristian Haugene 2020-11-10 21:50:37 +01:00
parent dc5d3242f0
commit 179d095ecd

View File

@ -16,29 +16,6 @@ STATUS=$?
if [[ ${STATUS} -ne 0 ]]
then
echo "Network is down"
INTERFACE=$(ls /sys/class/net | grep tun)
ISINTERFACE=$?
if [[ ${ISINTERFACE} -ne 0 ]]
then
echo "TUN Interface not found"
exit 1
fi
echo "Resetting TUN"
ip link set ${INTERFACE} down
sleep 1
ip link set ${INTERFACE} up
echo "Sent kill SIGUSR1 to openvpn"
pkill -SIGUSR1 openvpn
sleep 20
fi
ping -c 1 $HOST
STATUS=$?
if [[ ${STATUS} -ne 0 ]]
then
echo "Network is still down"
exit 1
fi