2012-01-30 15:59:01 +00:00
|
|
|
[Unit]
|
|
|
|
Description=Berkeley Internet Name Domain (DNS)
|
|
|
|
Wants=nss-lookup.target
|
2013-12-17 16:08:42 +00:00
|
|
|
Wants=named-setup-rndc.service
|
2012-01-30 15:59:01 +00:00
|
|
|
Before=nss-lookup.target
|
2013-12-17 16:08:42 +00:00
|
|
|
After=named-setup-rndc.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
|
|
|
|
PIDFile=/run/named/named.pid
|
|
|
|
|
2017-03-28 17:35:12 +00:00
|
|
|
ExecStartPre=/bin/bash -c 'if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z "$NAMEDCONF"; else echo "Checking of zone files is disabled"; fi'
|
|
|
|
ExecStart=/usr/sbin/named -u named -c ${NAMEDCONF} $OPTIONS
|
2019-08-09 10:32:48 +00:00
|
|
|
; until https://github.com/systemd/systemd/pull/13098 is present, ignore return value
|
2019-11-19 12:37:14 +00:00
|
|
|
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'
|
|
|
|
|
|
|
|
PrivateTmp=true
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|