Skip to content

Commit

Permalink
Quoting fixes, thanks to ShellCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Weiss committed Feb 15, 2015
1 parent 06b131e commit 98f8ea1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions check_ns_sanity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fi
hosttocheck="$1"

# Get the list of nameservers for the domain
nslist=$( ${DIG} ${hosttocheck} ns +short )
nslist=$( ${DIG} "${hosttocheck}" ns +short )
if [[ -z "${nslist}" ]] ; then
echo "CRITICAL: No NS records found for ${hosttocheck}"
exit 2
Expand All @@ -28,7 +28,7 @@ errorcount=0
errormessage=""

for nameserver in ${nslist} ; do
lookup=$( ${DIG} @${nameserver} ${hosttocheck} ${checktype} +short )
lookup=$( ${DIG} "@${nameserver}" "${hosttocheck}" "${checktype}" +short )
if [[ -z "${lookup}" ]] ; then
$errorcount++
errormessage="${errormessage}${nameserver} had no records for ${hosttocheck}\n"
Expand Down

0 comments on commit 98f8ea1

Please sign in to comment.