Skip to content

Commit

Permalink
šŸ› make it work againā€¦
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasmerz committed Feb 21, 2024
1 parent bdbac4b commit a586156
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions 01_dnsping.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cd ~/dev/dnspingtest_rrd/ || exit 1
PING=/usr/bin/dnsping
COUNT=4 # higher count = smoother / finer "loss" scale; lower count = less caching effects
DEADLINE=1 # even 1s (1000ms) is much too long to wait for!
tcp=''
tcp=

# ---
# inspired by: https://github.com/gitthangbaby/dnsperftest/blob/patch-1/dnstest_random#L28-L35
Expand Down Expand Up @@ -39,7 +39,9 @@ dnsping_host() {
domain=${domain:=heise.de}
fi
echo "querying $domain for $1"
output="$($PING "$tcp" -q -c $COUNT -w $DEADLINE -s "$1" "$domain" 2>&1)"
# Double quote to prevent globbing and word splitting. [SC2086]
# shellcheck disable=SC2086
output="$($PING $tcp -q -c $COUNT -w $DEADLINE -s "$1" "$domain" 2>&1)"
# notice $output is quoted to preserve newlines
temp=$(echo "$output"| awk '
BEGIN {pl=100; rtt=0.1}
Expand Down

0 comments on commit a586156

Please sign in to comment.