Created
August 25, 2013 23:45
-
-
Save miekg/6337012 to your computer and use it in GitHub Desktop.
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 | |
KEYDIR=/etc/bind/external/keys | |
DSDIR=/etc/bind/external/ds | |
ZONES="miek.nl atoom.net dnssex.nl dnsex.nl" | |
cd "$1" | |
for z in $ZONES; do | |
if [ -e $z.nsec3 ]; then | |
# sign with NSEC3 | |
/usr/sbin/dnssec-signzone -P $(grep -v '^\#' $z.nsec3) -N \ | |
unixtime -K $KEYDIR -d $DSDIR -o $z -S $z >/dev/null 2>&1 | |
else | |
/usr/sbin/dnssec-signzone -P -N unixtime -K $KEYDIR -d \ | |
$DSDIR -o $z -S $z >/dev/null 2>&1 | |
fi | |
/bin/chown bind.bind "$z.signed" | |
done | |
/usr/sbin/rndc reload >/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment