You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
651 B
25 lines
651 B
8 years ago
|
#!/bin/bash
|
||
|
|
||
|
echo "[`date +"%T"`] Secallzones starting... "
|
||
|
ZONES=`pdnsutil list-all-zones | grep -v "All zonecount"`
|
||
|
while read -r d; do
|
||
|
pdnsutil show-zone $d | grep presigned >/dev/null 2>&1
|
||
|
if [ $? -eq 0 ] ; then
|
||
|
echo "Securing $d..."
|
||
|
pdnsutil unset-presigned $d
|
||
|
pdnsutil secure-zone $d
|
||
|
pdnsutil rectify-zone $d
|
||
|
fixdsrrs.sh -d $d
|
||
|
else
|
||
|
pdnsutil show-zone $d | grep "not actively secured" >/dev/null 2>&1
|
||
|
if [ $? -eq 0 ] ; then
|
||
|
echo "Securing $d..."
|
||
|
pdnsutil secure-zone $d
|
||
|
pdnsutil rectify-zone $d
|
||
|
fixdsrrs.sh -d $d
|
||
|
fi
|
||
|
fi
|
||
|
|
||
|
done <<< "$ZONES"
|
||
|
echo "[`date +"%T"`] Secallzones finished."
|