Changes

Jump to: navigation, search

Get-root-zone

971 bytes added, 11:44, 17 December 2017
no edit summary
# for OPS535
# (c) 2016 - update for new wiki site
# (c) 2017 - update to prompt user to set the followings
# fqdn,ip for root name server
# email for dns admin
# RNS_FQDN, RNS_IP, DNS_ADMIN_EMAIL
if [ -z "${RNS_FQDN}" ]
then
echo "Please set the shell variable RNS_FQDN to the FQDN of your" >&2
echo "root name server and run this script again." >&2
exit 1
fi
 
if [ -z "${RNS_IP}" ]
then
echo "Please set the shell variable RNS_IP to the IP address" >&2
echo "of your root name server and run this script again." >&2
exit 2
fi
 
if [ -z "${DNS_ADMIN_EMAIL}" ]
then
echo "Please set the shell variable DNS_ADMIN_EMAIL to the" >&2
echo "email address of your DNS administrator and run this" >&2
echo "script again." >&2
exit 3
fi
# start loading dns information from the web
url=http://zenit.senecac.on.ca/wiki/index.php/Domainreg
a=0
b=6
# generating the zone file header
SN=$(date +%y%j%H) # yydddHH
echo "\$TTL 3600"
echo "@ IN SOA ${RNS_FQDN} ${DNS_ADMIN_EMAIL} (${SN} 1h 15m 30d 1h)"
echo " IN NS ${RNS_FQDN}"
echo "${RNS_FQDN} IN A ${RNS_IP}"
while [ $a -lt $nl ]
1,760
edits

Navigation menu