From 4e1fddb861983bb5940bb4ff1d7241955b6a99fc Mon Sep 17 00:00:00 2001 From: casjay Date: Fri, 31 Oct 2025 12:49:04 -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 detect_and_update_services.sh enhanced_functions.sh rootfs/usr/local/bin/entrypoint.sh rootfs/usr/local/etc/docker/functions/entrypoint.sh test_solution.sh rootfs/root/docker/setup/03-files.sh rootfs/usr/local/bin/entrypoint.sh rootfs/usr/local/etc/docker/init.d/02-named.sh --- rootfs/root/docker/setup/03-files.sh | 2 +- rootfs/usr/local/bin/entrypoint.sh | 14 +++++++++++--- rootfs/usr/local/etc/docker/init.d/02-named.sh | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/rootfs/root/docker/setup/03-files.sh b/rootfs/root/docker/setup/03-files.sh index 685f296..51938b1 100755 --- a/rootfs/root/docker/setup/03-files.sh +++ b/rootfs/root/docker/setup/03-files.sh @@ -24,7 +24,7 @@ set -o pipefail # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Set env variables exitCode=0 - +[ -d "/etc/bind" ] && rm -Rf "/etc/bind"/* # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Predifined actions if [ -d "/tmp/bin" ]; then diff --git a/rootfs/usr/local/bin/entrypoint.sh b/rootfs/usr/local/bin/entrypoint.sh index ec44080..e43e360 100755 --- a/rootfs/usr/local/bin/entrypoint.sh +++ b/rootfs/usr/local/bin/entrypoint.sh @@ -12,8 +12,8 @@ # @@Description : Entrypoint file for bind # @@Changelog : New script # @@TODO : Better documentation -# @@Other : -# @@Resource : +# @@Other : +# @@Resource : # @@Terminal App : no # @@sudo/root : no # @@Template : other/docker-entrypoint @@ -400,9 +400,17 @@ __run_message # - - - - - - - - - - - - - - - - - - - - - - - - - # Just start services START_SERVICES="${START_SERVICES:-SYSTEM_INIT}" +[ "$1" = "sh" ] && START_SERVICES=no +[ "$1" = "shell" ] && START_SERVICES=no +[ "$1" = "init" ] && START_SERVICES=no +[ "$1" = "backup" ] && START_SERVICES=no +[ "$1" = "healthcheck" ] && START_SERVICES=no +[ "$1" = "cron" ] && START_SERVICES=no +[ "$1" = "tail" ] && START_SERVICES=no +[ "$1" = "logs" ] && START_SERVICES=no # - - - - - - - - - - - - - - - - - - - - - - - - - # Start all services if no pidfile -if [ "$START_SERVICES" = "yes" ] && [ "$1" != "backup" ] && [ "$1" != "healthcheck" ] && [ "$1" != "cron" ] && [ "$1" != "tail" ] && [ "$1" != "logs" ] && [ "$1" != "cron" ]; then +if [ "$START_SERVICES" = "yes" ]; then [ "$1" = "start" ] && shift 1 [ "$1" = "all" ] && shift 1 [ "$1" = "init" ] && export CONTAINER_INIT="yes" 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 5cc22fd..eb74b14 100755 --- a/rootfs/usr/local/etc/docker/init.d/02-named.sh +++ b/rootfs/usr/local/etc/docker/init.d/02-named.sh @@ -102,7 +102,7 @@ CONF_DIR="/config/bind" # set config directory ETC_DIR="/etc/bind" # - - - - - - - - - - - - - - - - - - - - - - - - - # set the var dir -VAR_DIR="" +VAR_DIR="/var/bind" # - - - - - - - - - - - - - - - - - - - - - - - - - TMP_DIR="/tmp/bind" # set the temp dir RUN_DIR="/run/bind" # set scripts pid dir