diff options
author | nachoparker <nacho@ownyourbits.com> | 2018-04-21 14:25:32 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2018-04-22 11:55:28 +0300 |
commit | 20c734b068f2ae788e0b309cfa25b224860f4a21 (patch) | |
tree | cd1a593225d7bd2bb15302972fb16305f4572129 /bin/ncp-diag | |
parent | 1ddeebfd9221cd29b243866ff9f9f4aa3835103e (diff) |
fix double default gatewayv0.53.31
Diffstat (limited to 'bin/ncp-diag')
-rw-r--r-- | bin/ncp-diag | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ncp-diag b/bin/ncp-diag index b7d9ec95..77acd58b 100644 --- a/bin/ncp-diag +++ b/bin/ncp-diag @@ -69,8 +69,8 @@ echo "port check 80|$( is_port_open 80 )" echo "port check 443|$( is_port_open 443 )" # LAN -IFACE=$( ip r | grep "default via" | awk '{ print $5 }' ) -GW=$( ip r | grep "default via" | awk '{ print $3 }' ) +IFACE=$( ip r | grep "default via" | awk '{ print $5 }' | head -1 ) +GW=$( ip r | grep "default via" | awk '{ print $3 }' | head -1 ) IP=$( ip a show dev "$IFACE" | grep global | grep -oP '\d{1,3}(.\d{1,3}){3}' | head -1 ) echo "IP|$IP" |