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