mirror of
https://github.com/Ysurac/openmptcprouter-vps.git
synced 2025-02-12 11:21:56 +00:00
Add a check to not restart glorytun tcp too often
This commit is contained in:
parent
f89e40f9d9
commit
3a0fde41b4
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ _glorytun_tcp() {
|
|||
[ "$(echo $intf | grep key)" = "" ] && /etc/glorytun-tcp/post.sh ${intf}
|
||||
done
|
||||
if [ -f /etc/openmptcprouter-vps-admin/current-vpn ] && [ "$(cat /etc/openmptcprouter-vps-admin/current-vpn)" = "glorytun_tcp" ]; then
|
||||
if [ "$(ping -c 5 -w 5 10.255.255.2 | grep '100%')" != "" ]; then
|
||||
if [ "$(ping -c 5 -w 5 10.255.255.2 | grep '100%')" != "" ] && [ "$(expr $(date +%s) - $(stat -c %Y /proc/$(pgrep glorytun-tcp)/exe ))" -gt "300" ]; then
|
||||
logger -t "OMR-Service" "No answer from VPN client end, restart Glorytun-TCP"
|
||||
systemctl restart glorytun-tcp@tun0
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue