diff options
Diffstat (limited to 'src/dns/test_gnunet_dns.sh')
-rwxr-xr-x | src/dns/test_gnunet_dns.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/dns/test_gnunet_dns.sh b/src/dns/test_gnunet_dns.sh new file mode 100755 index 0000000..35585d4 --- /dev/null +++ b/src/dns/test_gnunet_dns.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +ME=`whoami` +if [ "$ME" != "root" ] +then + echo "This test only works if run as root. Skipping." + exit 0 +fi +export PATH=".:$PATH" +gnunet-service-dns -c dns.conf & +gnunet-dns-redirector -c dns.conf -4 127.0.0.1 & +sleep 1 +LO=`nslookup gnunet.org | grep Address | tail -n1` +if [ "$LO" != "Address: 127.0.0.1" ] +then + echo "Fail: $LO" +fi +kill `jobs -p` |