summaryrefslogtreecommitdiff
path: root/usr.sbin/unbound
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2014-05-29 22:34:04 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2014-05-29 22:34:04 +0000
commit9b17fa8f3c2075bf517bb71c3cbfe11be8bf71f9 (patch)
treee4be427c6d19d8540a680190e08b64208a0d98f4 /usr.sbin/unbound
parentc6317b83767b2522b7284ee236acf8545be90e57 (diff)
downloadsrc-test2-9b17fa8f3c2075bf517bb71c3cbfe11be8bf71f9.tar.gz
src-test2-9b17fa8f3c2075bf517bb71c3cbfe11be8bf71f9.zip
Notes
Diffstat (limited to 'usr.sbin/unbound')
-rwxr-xr-xusr.sbin/unbound/local-setup/local-unbound-setup.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/usr.sbin/unbound/local-setup/local-unbound-setup.sh b/usr.sbin/unbound/local-setup/local-unbound-setup.sh
index 99c93243553f..ca3eced13fe5 100755
--- a/usr.sbin/unbound/local-setup/local-unbound-setup.sh
+++ b/usr.sbin/unbound/local-setup/local-unbound-setup.sh
@@ -34,6 +34,7 @@ user=""
unbound_conf=""
forward_conf=""
workdir=""
+confdir=""
chrootdir=""
anchor=""
pidfile=""
@@ -55,6 +56,7 @@ bkext=$(date "+%Y%m%d.%H%M%S")
set_defaults() {
: ${user:=unbound}
: ${workdir:=/var/unbound}
+ : ${confdir:=${workdir}/conf.d}
: ${unbound_conf:=${workdir}/unbound.conf}
: ${forward_conf:=${workdir}/forward.conf}
: ${anchor:=${workdir}/root.key}
@@ -195,6 +197,9 @@ gen_unbound_conf() {
if [ -f "${forward_conf}" ] ; then
echo "include: ${forward_conf}"
fi
+ if [ -d "${confdir}" ] ; then
+ echo "include: ${confdir}/*.conf"
+ fi
}
#
@@ -227,7 +232,8 @@ usage() {
echo "options:"
echo " -n do not start unbound"
echo " -a path full path to trust anchor file"
- echo " -c path full path to unbound configuration"
+ echo " -C path full path to additional configuration directory"
+ echo " -c path full path to unbound configuration file"
echo " -f path full path to forwarding configuration"
echo " -p path full path to pid file"
echo " -R path full path to resolvconf.conf"
@@ -247,11 +253,14 @@ main() {
#
# Parse and validate command-line options
#
- while getopts "a:c:f:np:R:r:s:u:w:" option ; do
+ while getopts "a:C:c:f:np:R:r:s:u:w:" option ; do
case $option in
a)
anchor="$OPTARG"
;;
+ C)
+ confdir="$OPTARG"
+ ;;
c)
unbound_conf="$OPTARG"
;;