mirror of
https://github.com/Ysurac/openmptcprouter-vps.git
synced 2025-03-09 15:50:00 +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
|
for intf in /etc/glorytun-tcp/tun*; do
|
||||||
[ "$(echo $intf | grep key)" = "" ] && /etc/glorytun-tcp/post.sh ${intf}
|
[ "$(echo $intf | grep key)" = "" ] && /etc/glorytun-tcp/post.sh ${intf}
|
||||||
done
|
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() {
|
_omr_api() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue