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

Use W for ping in omr-tracker

This commit is contained in:
Ycarus 2018-02-28 17:12:20 +01:00
parent 559e8216af
commit afb0989e16
2 changed files with 4 additions and 4 deletions

View file

@ -5,7 +5,7 @@ m = Map("omr-tracker", translate("OMR-Tracker"), translate("OMR-Tracker detect w
s = m:section(TypedSection, "defaults", translate("Defaults Settings"))
s.anonymous = true
o = s:option(Value, "timeout", translate("Timeout Connect (s)"))
o = s:option(Value, "timeout", translate("Timeout (s)"))
o.placeholder = "1"
o.default = "1"
o.datatype = "range(1, 100)"
@ -17,7 +17,7 @@ o.default = "4"
o.datatype = "range(1, 10)"
o.rmempty = false
o = s:option(Value, "interval", translate("Interval (s)"))
o = s:option(Value, "interval", translate("Retry interval (s)"))
o.placeholder = "2"
o.default = "2"
o.datatype = "range(1, 100)"

View file

@ -91,7 +91,7 @@ while true; do
if [ -n "$OMR_TRACKER_DEVICE_IP" ] && [ -n "$OMR_TRACKER_DEVICE_GATEWAY" ]; then
retgw=$(ping "$OMR_TRACKER_DEVICE_GATEWAY" \
-I "$OMR_TRACKER_DEVICE_IP" \
-w 1 \
-W 1 \
-c 1 \
-q
) && echo "$retgw" | grep -sq "0% packet loss" && {
@ -102,7 +102,7 @@ while true; do
while [ "$tries" -gt 0 ]; do
ret=$(ping "$OMR_TRACKER_HOST" \
-I "$OMR_TRACKER_DEVICE_IP" \
-w "$OMR_TRACKER_TIMEOUT" \
-W "$OMR_TRACKER_TIMEOUT" \
-c 1 \
-q
) && echo "$ret" | grep -sq "0% packet loss" && {