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:
parent
956245a523
commit
3ba380d2fe
1 changed files with 6 additions and 0 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue