This commit is contained in:
2025-10-26 21:31:28 +01:00
commit 6456761b65
5 changed files with 161 additions and 0 deletions

36
generate-zones.sh Normal file
View 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"