From f6701ae8c260a63a3cc237020f1bafc387314552 Mon Sep 17 00:00:00 2001 From: Ycarus Date: Sat, 9 Jun 2018 07:56:06 +0200 Subject: [PATCH] Fix omr-6in4 --- omr-6in4/files/etc/init.d/omr-6in4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/omr-6in4/files/etc/init.d/omr-6in4 b/omr-6in4/files/etc/init.d/omr-6in4 index 3a69f1560..d782421a1 100755 --- a/omr-6in4/files/etc/init.d/omr-6in4 +++ b/omr-6in4/files/etc/init.d/omr-6in4 @@ -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