summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xcontrib/package/freifunk-common/files/usr/bin/neigh.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/package/freifunk-common/files/usr/bin/neigh.sh b/contrib/package/freifunk-common/files/usr/bin/neigh.sh
index b1dc01a77e..59ea8f914f 100755
--- a/contrib/package/freifunk-common/files/usr/bin/neigh.sh
+++ b/contrib/package/freifunk-common/files/usr/bin/neigh.sh
@@ -66,7 +66,8 @@ VARS="$VARS neighborLinkQuality:NLQ linkCost:Cost remoteHostname:Host"
for HOST in '127.0.0.1' '::1';do
json_init
- json_load "$(echo /links|nc ${HOST} 9090)"
+ json_load "$( echo /links | nc $HOST 9090 | grep ^'{' )" # remove header/non-json
+
if json_is_a links array;then
json_select links
for v in ${VARS};do