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