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