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.
24 lines
651 B
24 lines
651 B
#!/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."
|
|
|