🗃️ Committing everything that changed 🗃️

rootfs/tmp/etc/bind/named.conf
rootfs/usr/local/etc/docker/init.d/02-named.sh
This commit is contained in:
casjay 2025-06-06 23:48:06 -04:00
parent 98c6970e14
commit 90e3f9ecac
Signed by untrusted user who does not match committer: jason
GPG Key ID: 1AB309F42A764145
2 changed files with 15 additions and 4 deletions

View File

@ -8,7 +8,7 @@ key "backup-key" { algorithm hmac-sha512; secret "REPLACE_KEY_BACKUP"; };
#####################################################################
# access settings
acl "all" { 0.0.0.0/0; ::/0; };
acl "secondary" { REPLACE_DNS_SERVER_SECONDARY; };
acl "secondary" { REPLACE_DNS_SERVER_SECONDARY };
acl "trusted" { 10.0.0.0/8; 127.0.0.0/8; 172.16.0.0/12; 192.168.0.0/16; };
acl "updates" { key "dhcp-key"; key "certbot."; };
acl "transfers" {key "dhcp-key"; key "certbot."; key "backup-key"; secondary; };
@ -27,9 +27,9 @@ options {
max-ncache-ttl 10800;
max-udp-size 4096;
notify yes;
also-notify { REPLACE_DNS_SERVER_SECONDARY; };
also-notify { REPLACE_DNS_SERVER_SECONDARY };
allow-update { updates; };
allow-update-forwarding { REPLACE_DNS_SERVER_SECONDARY; };
allow-update-forwarding { REPLACE_DNS_SERVER_SECONDARY };
allow-transfer { trusted; };
transfer-format many-answers;
allow-query { any; };

View File

@ -250,6 +250,7 @@ __run_pre_execute_checks() {
__update_conf_files() {
local exitCode=0 # default exit code
local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" # set hostname
local secondary_ip=""
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# delete files
#__rm ""
@ -262,6 +263,12 @@ __update_conf_files() {
touch "$LOG_DIR/$logfile"
chmod -Rf 777 "$logfile"
done
if [ -n "$DNS_SERVER_SECONDARY" ]; then
for ip in ${DNS_SERVER_SECONDARY//;/ }; do
secondary_ip+="$ip; "
done
fi
DNS_SERVER_SECONDARY="$secondary_ip"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# replace variables
__replace "REPLACE_KEY_RNDC" "$KEY_RNDC" "$ETC_DIR/rndc.key"
@ -269,9 +276,13 @@ __update_conf_files() {
__replace "REPLACE_KEY_DHCP" "$KEY_DHCP" "$NAMED_CONFIG_FILE"
__replace "REPLACE_KEY_BACKUP" "$KEY_BACKUP" "$NAMED_CONFIG_FILE"
__replace "REPLACE_KEY_CERTBOT" "$KEY_CERTBOT" "$NAMED_CONFIG_FILE"
__replace "REPLACE_DNS_SERVER_SECONDARY" "$DNS_SERVER_SECONDARY" "$NAMED_CONFIG_FILE"
__find_replace "REPLACE_DNS_SERIAL" "$DNS_SERIAL" "$DATA_DIR/primary"
__find_replace "REPLACE_DNS_SERIAL" "$DNS_SERIAL" "$DATA_DIR/secondary"
if [ -n "$DNS_SERVER_SECONDARY" ]; then
__replace "REPLACE_DNS_SERVER_SECONDARY" "$DNS_SERVER_SECONDARY" "$NAMED_CONFIG_FILE"
else
sed -i '/REPLACE_DNS_SERVER_SECONDARY/d' "$NAMED_CONFIG_FILE"
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# define actions
if [ -f "$CONF_DIR/custom.conf" ]; then