2013-12-17 16:08:42 +00:00
|
|
|
# Don't forget to add "$AddUnixListenSocket /var/named/chroot_sdb/dev/log"
|
2012-01-30 15:59:01 +00:00
|
|
|
# line to your /etc/rsyslog.conf file. Otherwise your logging becomes
|
|
|
|
# broken when rsyslogd daemon is restarted (due update, for example).
|
|
|
|
|
|
|
|
[Unit]
|
|
|
|
Description=Berkeley Internet Name Domain (DNS)
|
|
|
|
Wants=nss-lookup.target
|
2013-12-17 16:08:42 +00:00
|
|
|
Requires=named-sdb-chroot-setup.service
|
2012-01-30 15:59:01 +00:00
|
|
|
Before=nss-lookup.target
|
2013-12-17 16:08:42 +00:00
|
|
|
After=named-sdb-chroot-setup.service
|
2016-05-12 11:31:49 +00:00
|
|
|
After=network.target
|
2012-01-30 15:59:01 +00:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=forking
|
2017-03-28 17:35:12 +00:00
|
|
|
Environment=NAMEDCONF=/etc/named.conf
|
2012-01-30 15:59:01 +00:00
|
|
|
EnvironmentFile=-/etc/sysconfig/named
|
|
|
|
Environment=KRB5_KTNAME=/etc/named.keytab
|
2013-12-17 16:08:42 +00:00
|
|
|
PIDFile=/var/named/chroot_sdb/run/named/named.pid
|
2012-01-30 15:59:01 +00:00
|
|
|
|
2017-03-28 17:35:12 +00:00
|
|
|
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'
|
|
|
|
ExecStart=/usr/sbin/named-sdb -u named -c ${NAMEDCONF} -t /var/named/chroot_sdb $OPTIONS
|
2012-01-30 15:59:01 +00:00
|
|
|
|
2019-08-09 10:32:48 +00:00
|
|
|
; until https://github.com/systemd/systemd/pull/13098 is present, ignore return value
|
|
|
|
ExecReload=-/bin/sh -c 'if /usr/sbin/rndc null > /dev/null 2>&1; then /usr/sbin/rndc reload; else /bin/kill -HUP $MAINPID; fi'
|
2012-01-30 15:59:01 +00:00
|
|
|
|
|
|
|
ExecStop=/bin/sh -c '/usr/sbin/rndc stop > /dev/null 2>&1 || /bin/kill -TERM $MAINPID'
|
|
|
|
|
2012-08-08 10:59:35 +00:00
|
|
|
PrivateTmp=false
|
2012-01-30 15:59:01 +00:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|