1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-vps.git synced 2025-02-12 11:21:56 +00:00

Check if Glorytun TCP client side answer, else restart it

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-10-30 14:21:28 +00:00
parent 956245a523
commit 3ba380d2fe

View file

@ -27,6 +27,12 @@ _glorytun_tcp() {
for intf in /etc/glorytun-tcp/tun*; do
[ "$(echo $intf | grep key)" = "" ] && /etc/glorytun-tcp/post.sh ${intf}
done
if [ "$(cat /etc/openmptcprouter-vps-admin/current-vpn)" = "glorytun_tcp" ]; then
if [ "$(ping -c 5 -w 5 10.255.255.2 | grep '100%')" != "" ]; then
logger -t "OMR-Service" "No answer from VPN client end, restart Glorytun-TCP"
systemctl restart glorytun-tcp@tun0
fi
fi
}
_omr_api() {