initial
This commit is contained in:
36
generate-zones.sh
Normal file
36
generate-zones.sh
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Script to generate zone configurations
|
||||
|
||||
ZONES_FILE="/etc/named/zones.conf"
|
||||
ZONES_DIR="/var/named"
|
||||
|
||||
# List of domains
|
||||
DOMAINS=(
|
||||
"whiskeylimahotel.de"
|
||||
"example.com"
|
||||
"test.org"
|
||||
)
|
||||
|
||||
echo "// Auto-generated zone configurations" > $ZONES_FILE
|
||||
echo "// Generated on $(date)" >> $ZONES_FILE
|
||||
echo "" >> $ZONES_FILE
|
||||
|
||||
for domain in "${DOMAINS[@]}"; do
|
||||
cat >> $ZONES_FILE << EOF
|
||||
zone "$domain" {
|
||||
type master;
|
||||
file "$domain.zone";
|
||||
allow-transfer { secondaries; };
|
||||
notify yes;
|
||||
also-notify {
|
||||
213.239.242.238;
|
||||
213.133.100.103;
|
||||
193.47.99.3;
|
||||
};
|
||||
};
|
||||
|
||||
EOF
|
||||
done
|
||||
|
||||
echo "Zone configurations generated in $ZONES_FILE"
|
||||
Reference in New Issue
Block a user