mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 18:41:51 +00:00
Put default values for all sleep in OMR-Tracker
This commit is contained in:
parent
08916a7788
commit
e9c8954c83
2 changed files with 5 additions and 4 deletions
|
@ -445,7 +445,7 @@ while true; do
|
|||
OMR_TRACKER_HOSTS="${OMR_TRACKER_HOSTS#* } $OMR_TRACKER_HOST"
|
||||
}
|
||||
#OMR_TRACKER_TIMEOUT=$((OMR_TRACKER_TIMEOUT * 2))
|
||||
sleep "$OMR_TRACKER_INTERVAL_TRIES"
|
||||
sleep "${OMR_TRACKER_INTERVAL_TRIES:-1}"
|
||||
done
|
||||
fi
|
||||
#if [ "$(uci -q get openmptcprouter.settings.disable_ipv6)" = "0" ] && [ -n "$OMR_TRACKER_DEVICE_IP6" ] && [ -n "$OMR_TRACKER_DEVICE_GATEWAY6" ]; then
|
||||
|
@ -550,7 +550,7 @@ while true; do
|
|||
OMR_TRACKER_HOSTS6="${OMR_TRACKER_HOSTS6#* } $OMR_TRACKER_HOST6"
|
||||
}
|
||||
#OMR_TRACKER_TIMEOUT=$((OMR_TRACKER_TIMEOUT * 2))
|
||||
sleep "$OMR_TRACKER_INTERVAL_TRIES"
|
||||
sleep "${OMR_TRACKER_INTERVAL_TRIES:-1}"
|
||||
done
|
||||
fi
|
||||
if [ -z "$OMR_TRACKER_DEVICE_IP" ] || [ -z "$OMR_TRACKER_DEVICE_GATEWAY" ] || [ -z "$OMR_TRACKER_DEVICE_IP6" ] || [ -z "$OMR_TRACKER_DEVICE_GATEWAY6" ]; then
|
||||
|
@ -611,8 +611,8 @@ while true; do
|
|||
_restart
|
||||
|
||||
if [ "$OMR_TRACKER_STATUS" = "ERROR" ]; then
|
||||
sleep "$OMR_TRACKER_FAILURE_INTERVAL"
|
||||
sleep "${$OMR_TRACKER_FAILURE_INTERVAL:-5}"
|
||||
else
|
||||
sleep "$OMR_TRACKER_INTERVAL"
|
||||
sleep "${OMR_TRACKER_INTERVAL:-2}"
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -98,6 +98,7 @@ _launch_tracker() {
|
|||
ifstatus=$(ifstatus "$1" | jsonfilter -q -e '@["up"]')
|
||||
ifdevice=$(ifstatus "$1" | jsonfilter -q -e '@["device"]')
|
||||
#[ "${ifstatus}" = "false" ] && [ -z "${ifdevice}" ] && return
|
||||
[ -z "${interval}" ] && interval=2
|
||||
[ -z "${interval_tries}" ] && interval_tries=1
|
||||
[ -z "${count}" ] && count=2
|
||||
[ -z "${max_ttl}" ] && max_ttl=60
|
||||
|
|
Loading…
Reference in a new issue