mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-15 03:51:51 +00:00
Fix OMR-Tracker ping detection (#413)
This commit is contained in:
commit
5e802b9d8a
1 changed files with 2 additions and 1 deletions
|
@ -173,7 +173,8 @@ _ping() {
|
|||
-Q 184 \
|
||||
"${host}" 2>&1
|
||||
)
|
||||
loss=$(echo "$ret" | grep 'packet loss' | sed -ne 's/.*\([0-9]\+\)% packet loss.*/\1/p')
|
||||
#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 [ "$localip" = "yes" ]; then
|
||||
latency=$(echo "$ret" | cut -d "/" -s -f5 | cut -d "." -f1 | tr -d '\n')
|
||||
|
|
Loading…
Reference in a new issue