#!/bin/bash

ROOT_TRUST_DIR=/var/lib/unbound
ROOT_TRUST_ANCHOR_FILE=${ROOT_TRUST_DIR}/root.key
UNBOUND_IP=127.0.0.1

mkdir -p ${ROOT_TRUST_DIR}
chown unbound:unbound ${ROOT_TRUST_DIR}
unbound-anchor -a $ROOT_TRUST_ANCHOR_FILE -v
chown unbound:unbound $ROOT_TRUST_ANCHOR_FILE
exec unbound -d -v -c /etc/unbound/unbound.conf

#!/bin/bash

ROOT_TRUST_DIR=/var/lib/unbound
ROOT_TRUST_ANCHOR_FILE=${ROOT_TRUST_DIR}/root.key
UNBOUND_IP=127.0.0.1

mkdir -p ${ROOT_TRUST_DIR}
chown unbound:unbound ${ROOT_TRUST_DIR}
unbound-anchor -a $ROOT_TRUST_ANCHOR_FILE -v
chown unbound:unbound $ROOT_TRUST_ANCHOR_FILE
exec unbound -p -c /etc/unbound/unbound.conf

Remove -d from the command line, add -p to suppress the pid file.
Remove -d from the command line, add -p to suppress the pid file.
