Created
June 27, 2012 09:00
-
-
Save gionn/3002606 to your computer and use it in GitHub Desktop.
Migration script from Windows DNS to PowerDNS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DOMAINARRAY=`cat /mnt/samba/winnt/system32/dns/domainlist` | |
for domainname in $DOMAINARRAY | |
do | |
echo " " | |
echo "$domainname being imported" | |
zone2sql --zone=$domainname.dns --gmysql --zone-name=$domainname | mysql -h | |
10.10.1.1 -D pdns -u pdns | |
echo "$domainname done!" | |
echo " " | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment