1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Fix packet loss check in OMR-Tracker

This commit is contained in:
Ycarus (Yannick Chabanois) 2024-07-09 17:26:00 +02:00
parent 67e9c6c46c
commit 8ce857cdd6

View file

@ -180,7 +180,7 @@ _ping() {
[ -n "$bindcheck" ] && OMR_TRACKER_NO_BIND=1
#loss=$(echo "$ret" | grep 'packet loss' | sed -ne 's/.*\([0-9]\+\)% packet loss.*/\1/p')
loss=$(echo "$ret" | grep 'packet loss' | cut -d " " -f6 | sed 's/%//' | tr -d '\n')
if [ -n "$loss" ] && [ "$loss" -ne 100 ]; then
if [ -n "$loss" ] && [ "$loss" != "100" ]; then
if [ "$localip" = "yes" ]; then
latency=$(echo "$ret" | grep rtt | cut -d "/" -s -f5 | cut -d "." -f1 | tr -d '\n')
[ -n "$latency" ] && {