mirror of
https://github.com/casjaysdevdocker/bind
synced 2025-11-04 13:02:16 -05:00
🗃️ Update codebase 🗃️
rootfs/root/docker/setup/03-files.sh rootfs/usr/local/etc/docker/init.d/02-named.sh
This commit is contained in:
@@ -24,6 +24,7 @@ set -o pipefail
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set env variables
|
||||
exitCode=0
|
||||
[ -d "/etc/tor" ] && rm -Rf "/etc/tor"/*
|
||||
[ -d "/etc/bind" ] && rm -Rf "/etc/bind"/*
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Predifined actions
|
||||
|
||||
@@ -281,7 +281,7 @@ __update_conf_files() {
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# custom commands
|
||||
mkdir -p "$CONF_DIR/keys" "$CONF_DIR/secrets"
|
||||
mkdir -p "$CONF_DIR/keys" "$CONF_DIR/secrets" "$DATA_DIR/zones"
|
||||
mkdir -p "$ETC_DIR/keys" "$ETC_DIR/secrets" "$VAR_DIR/primary" "$VAR_DIR/secondary" "$VAR_DIR/stats" "$VAR_DIR/dynamic"
|
||||
for logfile in debug.run querylog.log security.log xfer.log update.log notify.log client.log default.log general.log database.log; do
|
||||
touch "$LOG_DIR/$logfile"
|
||||
@@ -338,7 +338,7 @@ __pre_execute() {
|
||||
# __is_dir_empty "$CONF_DIR" && true
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# define actions to run after copying to /config
|
||||
zone_files="$(find "$DATA_DIR/zones/" -type f | wc -l)"
|
||||
zone_files="$(find "$DATA_DIR/zones/" -type f 2>/dev/null | wc -l)"
|
||||
if [ $zone_files = 0 ] && [ ! -f "$VAR_DIR/primary/$HOSTNAME.zone" ]; then
|
||||
cat <<EOF >>"$DNS_ZONE_FILE"
|
||||
# ********** begin $HOSTNAME **********
|
||||
|
||||
Reference in New Issue
Block a user