summaryrefslogtreecommitdiff
diff options
authorSylvain Pineau <sylvain.pineau@canonical.com>2020-07-13 10:43:52 +0200
committerSylvain Pineau <sylvain.pineau@canonical.com>2020-07-13 10:43:52 +0200
commit8a864c7d996a33c347178fa3c512152af6287b96 (patch)
tree2277805a25797329d05ef56fdf21f9f9e11c5630
parente426b57bbf74dacc567345ad70336e3e69cdd45a (diff)
bin:dns_server_test: Deleted
-rwxr-xr-xbin/dns_server_test49
1 files changed, 0 insertions, 49 deletions
diff --git a/bin/dns_server_test b/bin/dns_server_test
deleted file mode 100755
index 1b29595..0000000
--- a/bin/dns_server_test
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash
-#
-# Verify dns server setup
-# Packages and ports can be verified offline but external connections
-# require a network connection. The script will check for this.
-#
-
-# Verify process is running. Expected output 'pgrep named' is a $pid
-check=`pgrep named`
-if [ -z "$check" ]; then
- echo "FAIL: DNS bind is not running."
- exit 1
-fi
-
-# Check ports
-result1=`host www.ubuntu.com localhost | grep "#53"`
-result2=`host -T -6 www.ubuntu.com ip6-localhost | grep "#53"`
-if [ -z "$result1" ]; then
- echo "FAIL: DNS is not using port 53."
- exit 1
-elif [ -z "$result2" ]; then
- echo "FAIL: DNS is not using port 53 on IPv6."
- exit 1
-fi
-
-# Check if udp is established
-udpCheck=`netstat -auvpn | egrep '(:53)' |egrep 'udp'`
-if [ -z "$udpCheck" ]; then
- echo "FAIL: DNS udp setup is not established."
- exit 1
-fi
-
-# Check if external dns queries work but first verify the network
-# is up and running
-check=`ping -c 2 www.ubuntu.com |grep "2 received"`
-if [ -n "$check" ]; then
- failure="2(SERVFAIL)"
- result1=`host www.ubuntu.com localhost | grep "SERVFAIL" |awk '{print $5}'`
- result2=`host -T -6 www.ubuntu.com ip6-localhost | grep "SERVFAIL" |awk '{print $5}'`
- if [ "$result1" = $failure ]; then
- echo "FAIL: DNS external connection fails."
- exit 1
- elif [ "$result2" = $failure ]; then
- echo "FAIL: DNS external connection via IPv6 fails."
- exit 1
- fi
-fi
-
-exit 0