X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fnamestore%2Ftest_namestore_lookup.sh;h=90735b17e094fd0e67c624a9f98fa28807658f80;hb=c15e7951180d954ca584a95206543e8997b3a7d4;hp=99757b102c1243765f83e1804702a50d322f7fbe;hpb=ff30e05925284ed431e50f366b2f0aaecabf8a91;p=oweals%2Fgnunet.git diff --git a/src/namestore/test_namestore_lookup.sh b/src/namestore/test_namestore_lookup.sh index 99757b102..90735b17e 100755 --- a/src/namestore/test_namestore_lookup.sh +++ b/src/namestore/test_namestore_lookup.sh @@ -1,16 +1,28 @@ #!/bin/bash CONFIGURATION="test_namestore_api.conf" trap "gnunet-arm -e -c $CONFIGURATION" SIGINT -rm -rf `gnunet-config -c $CONFIGURATION -s PATHS -o SERVICEHOME` + +LOCATION=$(which gnunet-config) +if [ -z $LOCATION ] +then + LOCATION="gnunet-config" +fi +$LOCATION --version 1> /dev/null +if test $? != 0 +then + echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" + exit 77 +fi + +rm -rf `$LOCATION -c $CONFIGURATION -s PATHS -o GNUNET_HOME` TEST_IP_PLUS="127.0.0.1" -TEST_RECORD_NAME_PLUS="www" TEST_RECORD_NAME_DNS="www3" which timeout &> /dev/null && DO_TIMEOUT="timeout 5" function start_peer { gnunet-arm -s -c $CONFIGURATION - gnunet-identity -C testego -c $CONFIGURATION + gnunet-identity -C testego -c $CONFIGURATION } function stop_peer @@ -39,7 +51,7 @@ for LINE in $OUTPUT ; if echo "$LINE" | grep -q "$TEST_IP_PLUS"; then FOUND_IP=true; #echo $FOUND_IP - fi + fi done stop_peer