add test script for useful dig command to test queries against the server

This commit is contained in:
ddidderr 2022-04-03 23:58:24 +02:00
parent e0cc382eeb
commit 678e2ca60e
Signed by: ddidderr
GPG Key ID: 3841F1C27E6F0E14

16
dig_query.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
if [[ "$1" == "--help" || "$1" == "-h" ]]; then
echo "Usage: ${0} [domain] [record_type]"
exit
fi
if [[ -n "$1" ]]; then
if [[ -n "$2" ]]; then
dig @127.0.0.1 -p 13337 "$1" "$2" +retry=0
else
dig @127.0.0.1 -p 13337 "$1" A +retry=0
fi
else
dig @127.0.0.1 -p 13337 "git.comff.net" A +retry=0
fi