mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix omr-tracker
This commit is contained in:
parent
8eb08542c0
commit
0f24afb298
1 changed files with 3 additions and 1 deletions
|
@ -26,7 +26,7 @@ _validate_section() {
|
||||||
[ -z "$tries" ] && tries=$tmp_tries
|
[ -z "$tries" ] && tries=$tmp_tries
|
||||||
[ -z "$interval" ] && interval=$tmp_interval
|
[ -z "$interval" ] && interval=$tmp_interval
|
||||||
[ -z "$options" ] && options=$tmp_options
|
[ -z "$options" ] && options=$tmp_options
|
||||||
[ -z "$type" ] && options=$tmp_type
|
[ -z "$type" ] && type=$tmp_type
|
||||||
}
|
}
|
||||||
|
|
||||||
_launch_tracker() {
|
_launch_tracker() {
|
||||||
|
@ -47,6 +47,7 @@ _launch_tracker() {
|
||||||
config_get gateway "$1" gateway
|
config_get gateway "$1" gateway
|
||||||
|
|
||||||
[ -z "$ifname" ] || [ -z "$multipath" ] || [ "$multipath" = "off" ] && return
|
[ -z "$ifname" ] || [ -z "$multipath" ] || [ "$multipath" = "off" ] && return
|
||||||
|
[ -z "$type" ] && type="ping"
|
||||||
|
|
||||||
procd_open_instance
|
procd_open_instance
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
|
@ -58,6 +59,7 @@ _launch_tracker() {
|
||||||
procd_append_param env "OMR_TRACKER_TABLE=$ip4table"
|
procd_append_param env "OMR_TRACKER_TABLE=$ip4table"
|
||||||
procd_append_param env "OMR_TRACKER_DEVICE=$ifname"
|
procd_append_param env "OMR_TRACKER_DEVICE=$ifname"
|
||||||
procd_append_param env "OMR_TRACKER_DEVICE_GATEWAY=$gateway"
|
procd_append_param env "OMR_TRACKER_DEVICE_GATEWAY=$gateway"
|
||||||
|
procd_append_param env "OMR_TRACKER_TYPE=$type"
|
||||||
procd_set_param respawn 0 10 0
|
procd_set_param respawn 0 10 0
|
||||||
procd_set_param stderr 1
|
procd_set_param stderr 1
|
||||||
procd_close_instance
|
procd_close_instance
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue