diff --git a/rootfs/tmp/etc/bind/named.conf b/rootfs/tmp/etc/bind/named.conf index e2b2982..9862283 100644 --- a/rootfs/tmp/etc/bind/named.conf +++ b/rootfs/tmp/etc/bind/named.conf @@ -84,4 +84,5 @@ zone "." { file "REPLACE_VAR_DIR/root.cache"; }; # ********** end root info ********** -# end +##################################################################### +# begin imports diff --git a/rootfs/usr/local/etc/docker/init.d/00-named.sh b/rootfs/usr/local/etc/docker/init.d/00-named.sh index 06f0412..8a9052f 100755 --- a/rootfs/usr/local/etc/docker/init.d/00-named.sh +++ b/rootfs/usr/local/etc/docker/init.d/00-named.sh @@ -157,11 +157,11 @@ user_pass="${NAMED_USER_PASS_WORD:-}" # normal user password [ -f "/config/env/named.sh" ] && . "/config/env/named.sh" # Overwrite the variabes # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Additional predefined variables +DNS_SERIAL="$(date +'%Y%m%d%S')" KEY_RNDC="${KEY_RNDC:-$(__rndc_key || __tsig_key)}" KEY_DHCP="${KEY_DHCP:-$(__dhcp_key || __tsig_key)}" KEY_BACKUP="${KEY_BACKUP:-$(__backup_key || __tsig_key)}" KEY_CERTBOT="${KEY_CERTBOT:-$(__certbot_key || __tsig_key)}" -DNS_SERIAL="$(date +'%Y%m%d%S')" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Additional variables DNS_TYPE="${DNS_TYPE:-primary}" @@ -277,7 +277,7 @@ __pre_execute() { if [ $zone_files = 0 ] && [ ! -f "$DATA_DIR/zones/$HOSTNAME.zone" ]; then cat </dev/null ; config for $HOSTNAME -@ IN SOA $HOSTNAME. root.$HOSTNAME. ( $serial 10800 3600 1209600 38400) +@ IN SOA $HOSTNAME. root.$HOSTNAME. ( $DNS_SERIAL 10800 3600 1209600 38400) IN NS $HOSTNAME. $HOSTNAME. IN A $CONTAINER_IP4_ADDRESS