2e2c49
# Don't forget to add "$AddUnixListenSocket /var/named/chroot_sdb/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-sdb-chroot-setup.service
2e2c49
Before=nss-lookup.target
2e2c49
After=named-sdb-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_sdb/run/named/named.pid
2e2c49
2e2c49
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'
2e2c49
ExecStart=/usr/sbin/named-sdb -u named -c ${NAMEDCONF} -t /var/named/chroot_sdb $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