From 4987e52654332397efdf844bae8ae58c224d837b Mon Sep 17 00:00:00 2001 From: casjay Date: Fri, 31 Oct 2025 13:27:32 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Update=20codebase=20?= =?UTF-8?q?=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rootfs/root/docker/setup/03-files.sh rootfs/usr/local/etc/docker/init.d/02-named.sh rootfs/usr/local/etc/docker/init.d/02-named.sh --- rootfs/usr/local/etc/docker/init.d/02-named.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rootfs/usr/local/etc/docker/init.d/02-named.sh b/rootfs/usr/local/etc/docker/init.d/02-named.sh index 9abfb5e..806a3e9 100755 --- a/rootfs/usr/local/etc/docker/init.d/02-named.sh +++ b/rootfs/usr/local/etc/docker/init.d/02-named.sh @@ -340,6 +340,7 @@ __pre_execute() { # define actions to run after copying to /config zone_files="$(find "$DATA_DIR/zones/" -type f 2>/dev/null | wc -l)" if [ $zone_files = 0 ] && [ ! -f "$VAR_DIR/primary/$HOSTNAME.zone" ]; then + file_name="$VAR_DIR/primary/$HOSTNAME.zone" cat <>"$DNS_ZONE_FILE" # ********** begin $HOSTNAME ********** zone "$HOSTNAME" { @@ -362,7 +363,7 @@ $HOSTNAME. IN A $CONTAINER_IP4_ADDRESS EOF fi # - if [ -d "$DATA_DIR/zones" ]; then + if [ -d "$DATA_DIR/zones" ] && [ "$zone_files" -ne 0 ]; then for dns_file in "$DATA_DIR/zones"/*; do file_name="$(basename "$dns_file")" domain_name="$(grep -Rs '\$ORIGIN' "$dns_file" | awk '{print $NF}' | sed 's|.$||g')"