blob: 3e8e58fa0ad4e52a0467927b9abdddbb73c88989 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/bin/bash
set -e
expected=93.184.216.34
answer=$(kdig +short +tls-ca +tls-hostname=dns.cmrg.net @dns.cmrg.net example.org 2>&1 || true)
if [ "$answer" != "$expected" ]; then
# fallback to port 443/tcp (in case it cannot reach 853)
answer=$(kdig +short +tls-ca +tls-hostname=dns.cmrg.net -p 443 @dns.cmrg.net example.org 2>&1 || true)
fi
if [ "$answer" != "$expected" ]; then
printf "expected: %s\ngot: %s\n" "$expected" "$answer" >&2
kdig +tls-ca +tls-hostname=dns.cmrg.net @dns.cmrg.net example.org
fi
|