Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- REC=ucheck.domain
- NS="a b c d"
- HO=.ns.domain
- time=$(date +%s)
- for n in $NS; do
- n="$n$HO"
- res=$(dig @$n +short TXT $REC | sed 's/"//g')
- if [ -z "$res" -o "${res%[a-z]}" != "${res}" ]; then
- echo "Bad $n"
- elif [ "$res" -lt "$[$time - 600]" ] 2>/dev/null; then
- echo "Bad $n"
- fi
- done
Add Comment
Please, Sign In to add comment