bc5dde
# Don't forget to add "$AddUnixListenSocket /var/named/chroot/dev/log"
bc5dde
# line to your /etc/rsyslog.conf file. Otherwise your logging becomes
bc5dde
# broken when rsyslogd daemon is restarted (due update, for example).
bc5dde
bc5dde
[Unit]
bc5dde
Description=Berkeley Internet Name Domain (DNS)
bc5dde
Wants=nss-lookup.target
bc5dde
Before=nss-lookup.target
bc5dde
After=network.target
bc5dde
bc5dde
[Service]
bc5dde
Type=forking
bc5dde
EnvironmentFile=-/etc/sysconfig/named
bc5dde
Environment=KRB5_KTNAME=/etc/named.keytab
bc5dde
PIDFile=/var/named/chroot/run/named/named.pid
bc5dde
bc5dde
ExecStartPre=/usr/libexec/generate-rndc-key.sh
bc5dde
ExecStartPre=/usr/libexec/setup-named-chroot.sh /var/named/chroot on
bc5dde
ExecStartPre=/usr/sbin/named-checkconf -t /var/named/chroot -z /etc/named.conf
bc5dde
ExecStart=/usr/sbin/named -u named -t /var/named/chroot $OPTIONS
bc5dde
bc5dde
ExecReload=/bin/sh -c '/usr/sbin/rndc reload > /dev/null 2>&1 || /bin/kill -HUP $MAINPID'
bc5dde
bc5dde
ExecStop=/bin/sh -c '/usr/sbin/rndc stop > /dev/null 2>&1 || /bin/kill -TERM $MAINPID'
bc5dde
ExecStopPost=/usr/libexec/setup-named-chroot.sh /var/named/chroot off
bc5dde
bc5dde
PrivateTmp=false
bc5dde
bc5dde
[Install]
bc5dde
WantedBy=multi-user.target