mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Return latencies without endline
This commit is contained in:
parent
3836f9a225
commit
c9ad59784e
1 changed files with 2 additions and 2 deletions
|
@ -153,7 +153,7 @@ _ping() {
|
||||||
"${host}" 2>&1
|
"${host}" 2>&1
|
||||||
) && echo "$ret" | grep -sq "bytes from" && {
|
) && echo "$ret" | grep -sq "bytes from" && {
|
||||||
if [ "$localip" = "yes" ]; then
|
if [ "$localip" = "yes" ]; then
|
||||||
OMR_TRACKER_LATENCY=$(echo "$ret" | cut -d "/" -s -f5 | cut -d "." -f1)
|
OMR_TRACKER_LATENCY=$(echo "$ret" | cut -d "/" -s -f5 | cut -d "." -f1 | tr -d '\n')
|
||||||
_update_rto "$OMR_TRACKER_LATENCY"
|
_update_rto "$OMR_TRACKER_LATENCY"
|
||||||
fi
|
fi
|
||||||
return
|
return
|
||||||
|
@ -166,7 +166,7 @@ _ping() {
|
||||||
"${host}" 2>&1
|
"${host}" 2>&1
|
||||||
) && echo "$ret" | grep -sq "bytes from" && {
|
) && echo "$ret" | grep -sq "bytes from" && {
|
||||||
if [ "$localip" = "yes" ]; then
|
if [ "$localip" = "yes" ]; then
|
||||||
OMR_TRACKER_LATENCY=$(echo "$ret" | cut -d "/" -s -f5 | cut -d "." -f1)
|
OMR_TRACKER_LATENCY=$(echo "$ret" | cut -d "/" -s -f5 | cut -d "." -f1 | tr -d '\n')
|
||||||
_update_rto "$OMR_TRACKER_LATENCY"
|
_update_rto "$OMR_TRACKER_LATENCY"
|
||||||
fi
|
fi
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue