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