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