-
-
Save mysterious-static/ab7e3a5cc28c3a7f3533820c8a883867 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 | |
for file in `ls -1 ~/zones` | |
do | |
suffix=".dns" | |
domainname=${file%$suffix} | |
echo " " | |
echo "$domainname being imported" | |
zone2sql --zone=$file --gmysql --zone-name=$domainname | mysql -h | |
localhost -D pdns -u pdns | |
pdnsutil set-kind $domainname master | |
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