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