testnet.sh: Fix routerInfo count check

Since IFS also has newline now, it was creating an array.
When simply echoing an array, it just echos the first element - always...
 there was thus always only 1 element.

That's fixed now.

#5 - Create SAM server tunnels in trans-proxy
This commit is contained in:
2021-01-04 01:05:55 +01:00
parent a12db072ec
commit 157849332f

View File

@@ -48,11 +48,10 @@ while [ $riCount != $routerCount ]; do
docker-compose -f ${yaml} start i2pd
_log "Contents of netDb (expecting ${routerCount} entries)"
netDbOutput=$(docker-compose -f ${yaml} exec i2pd find netDb -name '*.dat')
riCount=$(echo ${netDbOutput} | wc -l)
netDbOutput="$(docker-compose -f ${yaml} exec i2pd find netDb -name '*.dat')"
riCount=$(echo "${netDbOutput[@]}" | grep routerInfo | wc -l)
_log "Found $riCount entries:"
echo $netDbOutput
echo "${netDbOutput[@]}"
done
echo "Done! You have a complete netDb"