#!/bin/bash set -e # Empties the contents of the root dns file 0>work/db.root # Prints a header for the root dns file cat > work/db.root <<-EOF \$TTL 2d ; Default TTL for zone \$ORIGIN . @ IN SOA dumb. pufferfish.mpgn.dev. ( 0 ; serial number 12h ; refresh 15m ; update retry 3w ; expiry 2h ; minimum ) EOF # Adds the root dns zone's content dig -t axfr . @iad.xfr.dns.icann.org \ |grep -E 'DS|NS|A|AAAA' \ |sed '/RRSIG/d' \ |sed '/^\./d' >> work/db.root