#!/bin/sh # # nsd.conf-generator — generate nsd.conf through interpolation # # Copyright © 2014 martin f. krafft # Released under the terms of the Artistic Licence 2.0 # set -eu PARAMS_FILE="$1"; if [ ! -r "$PARAMS_FILE" ]; then echo >&2 "E: cannot read parameters from $PARAMS_FILE" exit 1 fi . $PARAMS_FILE NSD_DIR=${0%/*} [ "$NSD_DIR" = "." ] && NSD_DIR=${PWD} exec cat <<_eof server: # uncomment to specify specific interfaces to bind (default all). ip-address: 127.0.1.1 ip-address: $BIND_IPV4 ip-address: $BIND_IPV6 # don't answer VERSION.BIND and VERSION.SERVER CHAOS class queries hide-version: yes # identify the server (CH TXT ID.SERVER entry). identity: "$IDENTITY" # do not include subdir yet (cf. #772776) #include: "$NSD_DIR/nsd.conf.d/*.conf" include: "$NSD_DIR/zones.conf" _eof