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:
parent
559e8216af
commit
afb0989e16
2 changed files with 4 additions and 4 deletions
|
@ -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 = m:section(TypedSection, "defaults", translate("Defaults Settings"))
|
||||||
s.anonymous = true
|
s.anonymous = true
|
||||||
|
|
||||||
o = s:option(Value, "timeout", translate("Timeout Connect (s)"))
|
o = s:option(Value, "timeout", translate("Timeout (s)"))
|
||||||
o.placeholder = "1"
|
o.placeholder = "1"
|
||||||
o.default = "1"
|
o.default = "1"
|
||||||
o.datatype = "range(1, 100)"
|
o.datatype = "range(1, 100)"
|
||||||
|
@ -17,7 +17,7 @@ o.default = "4"
|
||||||
o.datatype = "range(1, 10)"
|
o.datatype = "range(1, 10)"
|
||||||
o.rmempty = false
|
o.rmempty = false
|
||||||
|
|
||||||
o = s:option(Value, "interval", translate("Interval (s)"))
|
o = s:option(Value, "interval", translate("Retry interval (s)"))
|
||||||
o.placeholder = "2"
|
o.placeholder = "2"
|
||||||
o.default = "2"
|
o.default = "2"
|
||||||
o.datatype = "range(1, 100)"
|
o.datatype = "range(1, 100)"
|
||||||
|
|
|
@ -91,7 +91,7 @@ while true; do
|
||||||
if [ -n "$OMR_TRACKER_DEVICE_IP" ] && [ -n "$OMR_TRACKER_DEVICE_GATEWAY" ]; then
|
if [ -n "$OMR_TRACKER_DEVICE_IP" ] && [ -n "$OMR_TRACKER_DEVICE_GATEWAY" ]; then
|
||||||
retgw=$(ping "$OMR_TRACKER_DEVICE_GATEWAY" \
|
retgw=$(ping "$OMR_TRACKER_DEVICE_GATEWAY" \
|
||||||
-I "$OMR_TRACKER_DEVICE_IP" \
|
-I "$OMR_TRACKER_DEVICE_IP" \
|
||||||
-w 1 \
|
-W 1 \
|
||||||
-c 1 \
|
-c 1 \
|
||||||
-q
|
-q
|
||||||
) && echo "$retgw" | grep -sq "0% packet loss" && {
|
) && echo "$retgw" | grep -sq "0% packet loss" && {
|
||||||
|
@ -102,7 +102,7 @@ while true; do
|
||||||
while [ "$tries" -gt 0 ]; do
|
while [ "$tries" -gt 0 ]; do
|
||||||
ret=$(ping "$OMR_TRACKER_HOST" \
|
ret=$(ping "$OMR_TRACKER_HOST" \
|
||||||
-I "$OMR_TRACKER_DEVICE_IP" \
|
-I "$OMR_TRACKER_DEVICE_IP" \
|
||||||
-w "$OMR_TRACKER_TIMEOUT" \
|
-W "$OMR_TRACKER_TIMEOUT" \
|
||||||
-c 1 \
|
-c 1 \
|
||||||
-q
|
-q
|
||||||
) && echo "$ret" | grep -sq "0% packet loss" && {
|
) && echo "$ret" | grep -sq "0% packet loss" && {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue