mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix omr-6in4
This commit is contained in:
parent
79b2e1c88b
commit
f6701ae8c2
1 changed files with 2 additions and 2 deletions
|
@ -10,8 +10,8 @@ service_triggers() {
|
|||
|
||||
reload_service() {
|
||||
iface=$(uci -q get glorytun.vpn.dev)
|
||||
addr=$(ubus call network.interface.omrvpn status | jsonfilter -e '@["ipv4-address"][0].address | tr -d "\n")
|
||||
[ -z "$addr" ] && [ -n "$iface" ] && addr=$(ip -4 addr show dev $iface | grep inet | awk '{print $2}' | cut -d/ -f1 | grep -v / | tr -d "\n")
|
||||
addr=$(ubus call network.interface.omrvpn status | jsonfilter -e '@["ipv4-address"][0].address' | tr -d "\n")
|
||||
[ -z "$addr" ] && [ -n "$iface" ] && addr=$(ip -4 addr show dev $iface | grep inet | awk '{print $2}' | cut -d/ -f1 | tr -d "\n")
|
||||
peer=$(ubus call network.interface.omrvpn status | jsonfilter -e '@.route[0].nexthop' | tr -d "\n")
|
||||
[ -z "$peer" ] && [ -n "$iface" ] && peer=$(ip -4 r list dev $iface | grep kernel | awk '/proto kernel/ {print $1}' | grep -v / | tr -d "\n")
|
||||
[ -z "$addr" ] && exit 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue