#!/bin/bash

# named.start
#
#       Note: the path given to the "-c" parameter is relative
#       to the jail's root, not the system root.
#
#       Add "-n2" if you have multiple CPUs
#
# usage: named [-c conffile] [-d debuglevel] [-f|-g] [-n number_of_cpus]
#              [-p port] [-s] [-t chrootdir] [-u username]

cd /var/named/chroot

# make sure the debugging-output file is writable by named
touch named.run
chown named:named named.run
chmod ug=rw,o=r   named.run

PATH=/usr/local/sbin:$PATH named  \
        -t /var/named/chroot \
        -u named \
        -c /var/named/chroot/etc/named.conf
