From cd0ae36eb77cd7c7df274267764bffc58624c305 Mon Sep 17 00:00:00 2001 From: casjay Date: Tue, 20 May 2025 10:46:42 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Committing=20everything?= =?UTF-8?q?=20that=20changed=20=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/07-cleanup.sh rootfs/usr/local/etc/docker/init.d/02-named.sh --- rootfs/root/docker/setup/07-cleanup.sh | 2 ++ rootfs/usr/local/etc/docker/init.d/02-named.sh | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rootfs/root/docker/setup/07-cleanup.sh b/rootfs/root/docker/setup/07-cleanup.sh index b410b44..03fc642 100755 --- a/rootfs/root/docker/setup/07-cleanup.sh +++ b/rootfs/root/docker/setup/07-cleanup.sh @@ -28,6 +28,8 @@ exitCode=0 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Predifined actions [ -d "/tmp" ] && rm -Rf "/tmp"/* +[ -d "/var/bind" ] && rm -Rf "/var/bind"/* +[ -d "/var/named" ] && rm -Rf "/var/named"/* # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Main script 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 3bd398e..aa47f54 100755 --- a/rootfs/usr/local/etc/docker/init.d/02-named.sh +++ b/rootfs/usr/local/etc/docker/init.d/02-named.sh @@ -210,6 +210,7 @@ __run_precopy() { __execute_prerun() { # Define environment local hostname=${HOSTNAME} + printf '\n%s\n' "$(date)" >>"$LOG_DIR/init.txt" # Define actions/commands } @@ -377,9 +378,9 @@ EOF if named-checkzone -q $domain_name "$TMP_DIR/$file_name"; then cat "$TMP_DIR/$file_name" >>"$DNS_ZONE_FILE" - echo "Added $domain_name to $DNS_ZONE_FILE" + echo "Added $domain_name to $DNS_ZONE_FILE" | tee -a "$LOG_DIR/init.txt" else - echo "Checking $domain_name has failed" >&2 + echo "Checking $domain_name has failed" | tee -a "$LOG_DIR/init.txt" >&2 fi rm "$TMP_DIR/$file_name" done