diff --git a/bin/monitor.sh b/bin/monitor.sh index 312c4d7281f6429d6a2b4aa67b34745605edbd53..478e9cbae740d0551e4d888d3afa018265c2dfb7 100755 --- a/bin/monitor.sh +++ b/bin/monitor.sh @@ -29,7 +29,7 @@ echo "total-peer-count: ${numpeers}" >> ${statusfile} peercount=0 for idx in $( seq 0 $(( $numpeers - 1 )) ) do - eth=$( echo "$json" | jq -r .result[$idx].protocols.eth ) + eth=$( echo "$json" | jq -r .[$idx].protocols.eth ) if [ "$eth" = "handshake" ] then continue @@ -37,11 +37,11 @@ do #echo -n "$idx: "; echo "$eth" | jq -c remoteid=$( echo "$json" | - jq -r .result[$idx].id + jq -r .[$idx].id ) remoteaddress=$( echo "$json" | - jq -r .result[$idx].network.remoteAddress + jq -r .[$idx].network.remoteAddress ) remoteip=$( echo "$remoteaddress" |