a2a915
# Don't forget to add "$AddUnixListenSocket /var/named/chroot/dev/log"
a2a915
# line to your /etc/rsyslog.conf file. Otherwise your logging becomes
a2a915
# broken when rsyslogd daemon is restarted (due update, for example).
a2a915
a2a915
[Unit]
a2a915
Description=Berkeley Internet Name Domain (DNS)
a2a915
Wants=nss-lookup.target
a2a915
Requires=named-chroot-setup.service
a2a915
Before=nss-lookup.target
a2a915
After=network.target
a2a915
After=named-chroot-setup.service
a2a915
a2a915
[Service]
a2a915
Type=forking
a2a915
Environment=NAMEDCONF=/etc/named.conf
a2a915
EnvironmentFile=-/etc/sysconfig/named
a2a915
Environment=KRB5_KTNAME=/etc/named.keytab
a2a915
PIDFile=/var/named/chroot/run/named/named.pid
a2a915
a2a915
ExecStartPre=/bin/bash -c 'if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -t /var/named/chroot -z "$NAMEDCONF"; else echo "Checking of zone files is disabled"; fi'
a2a915
ExecStart=/usr/sbin/named -u named -c ${NAMEDCONF} -t /var/named/chroot $OPTIONS
a2a915
a2a915
ExecReload=/bin/sh -c '/usr/sbin/rndc reload > /dev/null 2>&1 || /bin/kill -HUP $MAINPID'
a2a915
a2a915
ExecStop=/bin/sh -c '/usr/sbin/rndc stop > /dev/null 2>&1 || /bin/kill -TERM $MAINPID'
a2a915
a2a915
PrivateTmp=false
a2a915
a2a915
[Install]
a2a915
WantedBy=multi-user.target