mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
add quiet options when jsonfilter is used
This commit is contained in:
parent
eb9658bcb1
commit
f6efdc51c9
6 changed files with 13 additions and 13 deletions
|
@ -152,10 +152,10 @@ while true; do
|
|||
OMR_TRACKER_DEVICE_GATEWAY=$(uci -q get "network.$OMR_TRACKER_INTERFACE.gateway")
|
||||
fi
|
||||
if [ -z "$OMR_TRACKER_DEVICE_GATEWAY" ]; then
|
||||
OMR_TRACKER_DEVICE_GATEWAY=$(ubus call network.interface.$OMR_TRACKER_INTERFACE status | jsonfilter -e '@.route[0].nexthop' | tr -d "\n")
|
||||
OMR_TRACKER_DEVICE_GATEWAY=$(ubus call network.interface.$OMR_TRACKER_INTERFACE status | jsonfilter -q -e '@.route[0].nexthop' | tr -d "\n")
|
||||
fi
|
||||
if [ -z "$OMR_TRACKER_DEVICE_GATEWAY" ]; then
|
||||
OMR_TRACKER_DEVICE_GATEWAY=$(ubus call network.interface.$OMR_TRACKER_INTERFACE status | jsonfilter -e '@.inactive.route[0].nexthop' | tr -d "\n")
|
||||
OMR_TRACKER_DEVICE_GATEWAY=$(ubus call network.interface.$OMR_TRACKER_INTERFACE status | jsonfilter -q -e '@.inactive.route[0].nexthop' | tr -d "\n")
|
||||
fi
|
||||
|
||||
# execute specific tracker
|
||||
|
|
|
@ -42,7 +42,7 @@ _launch_tracker() {
|
|||
|
||||
local ifname ip4table
|
||||
config_get ifname "$1" ifname
|
||||
[ -z "$ifname" ] && ifname=$(ifstatus "$1" | jsonfilter -e '@["l3_device"]')
|
||||
[ -z "$ifname" ] && ifname=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]')
|
||||
|
||||
config_get multipath "$1" multipath
|
||||
config_get gateway "$1" gateway
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue