8c876df6135e5ca895e3318a195ae384f89c5183
[oweals/gnunet.git] / src / gns / test_gns_lookup.sh
1 #!/bin/bash
2 trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
3
4 TEST_IP="127.0.0.1"
5
6 gnunet-arm -s -c test_gns_lookup.conf
7
8 #gnunet-identity -C testego -c test_gns_lookup.conf
9
10 gnunet-namestore -p -z testego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
11 RES_IP=$(gnunet-gns --raw -z testego -u www.gnu -t A -c test_gns_lookup.conf)
12
13 gnunet-namestore -z testego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
14
15 gnunet-arm -e -c test_gns_lookup.conf
16
17 if [ "$RES_IP" == "$TEST_IP" ]
18 then
19   exit 0
20 else
21   exit 1
22 fi
23