fd4b48
# Don't forget to add "$AddUnixListenSocket /var/named/chroot_sdb/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
fd4b48
Requires=named-sdb-chroot-setup.service
bc5dde
Before=nss-lookup.target
bc5dde
After=network.target
fd4b48
After=named-sdb-chroot-setup.service
bc5dde
bc5dde
[Service]
bc5dde
Type=forking
c8cd03
Environment=NAMEDCONF=/etc/named.conf
bc5dde
EnvironmentFile=-/etc/sysconfig/named
bc5dde
Environment=KRB5_KTNAME=/etc/named.keytab
fd4b48
PIDFile=/var/named/chroot_sdb/run/named/named.pid
bc5dde
c8cd03
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'
c8cd03
ExecStart=/usr/sbin/named-sdb -u named -c ${NAMEDCONF} -t /var/named/chroot_sdb $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
bc5dde
PrivateTmp=false
bc5dde
bc5dde
[Install]
bc5dde
WantedBy=multi-user.target