Created
November 21, 2013 09:22
-
-
Save doekenorg/7578491 to your computer and use it in GitHub Desktop.
Little bashscript that find replaces every ip in a series of named-files.
This file contains 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
#dnschange.sh | |
!/bin/sh | |
for domain in "$@" | |
do | |
sed -i 's/ORIGINAL_IP/NEW_IP/g' /var/named/$domain.db | |
done | |
echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue | |
#usage: ./dnschange.sh domain.ext domain2.ext domain3.etc etc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment