mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix and less logs
This commit is contained in:
parent
3ccf83ccae
commit
70fc753aa9
2 changed files with 14 additions and 7 deletions
|
@ -15,6 +15,8 @@ export OMR_TRACKER_INTERFACE
|
|||
export OMR_TRACKER_HOST
|
||||
export OMR_TRACKER_TIMEOUT
|
||||
export OMR_TRACKER_STATUS
|
||||
export OMR_TRACKER_STATUS_MSG
|
||||
export OMR_TRACKER_PREV_STATUS
|
||||
export OMR_TRACKER_DEVICE
|
||||
export OMR_TRACKER_DEVICE_IP
|
||||
export OMR_TRACKER_DEVICE_GATEWAY
|
||||
|
@ -133,12 +135,12 @@ _none() {
|
|||
|
||||
_restart
|
||||
|
||||
OMR_TRACKER_PREV_STATUS=""
|
||||
# main loop
|
||||
while true; do
|
||||
# setup tracker variables
|
||||
OMR_TRACKER_DEVICE_IP=
|
||||
OMR_TRACKER_STATUS="ERROR"
|
||||
OMR_TRACKER_STATUS_MSG=""
|
||||
OMR_TRACKER_LATENCY=
|
||||
OMR_TRACKER_TIMEOUT=$((rto / 1000 + (rto % 1000 ? 1 : 0)))
|
||||
OMR_TRACKER_LIST_HOSTS=""
|
||||
|
@ -229,7 +231,9 @@ while true; do
|
|||
|
||||
#[ "$OMR_TRACKER_HOSTS" = "$initial_hosts" ] || [ "$OMR_TRACKER_STATUS" = "OK" ] && _post_tracking
|
||||
#[ "$OMR_TRACKER_STATUS" = "ERROR" ] && _restart
|
||||
#[ "$OMR_TRACKER_STATUS" != "$OMR_TRACKER_PREV_STATUS" ] && _post_tracking
|
||||
_post_tracking
|
||||
OMR_TRACKER_PREV_STATUS="$OMR_TRACKER_STATUS"
|
||||
_restart
|
||||
|
||||
sleep "$OMR_TRACKER_INTERVAL"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue