1baafe
[Unit]
1baafe
Description=Berkeley Internet Name Domain (DNS)
1baafe
Wants=nss-lookup.target
1baafe
Wants=named-setup-rndc.service
1baafe
Before=nss-lookup.target
1baafe
After=named-setup-rndc.service
1baafe
After=network.target
1baafe
1baafe
[Service]
1baafe
Type=forking
1baafe
Environment=NAMEDCONF=/etc/named.conf
1baafe
EnvironmentFile=-/etc/sysconfig/named
1baafe
Environment=KRB5_KTNAME=/etc/named.keytab
1baafe
PIDFile=/run/named/named.pid
1baafe
1baafe
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'
1baafe
ExecStart=/usr/sbin/named -u named -c ${NAMEDCONF} $OPTIONS
1baafe
ExecReload=/bin/sh -c 'if /usr/sbin/rndc null > /dev/null 2>&1; then /usr/sbin/rndc reload; else /bin/kill -HUP $MAINPID; fi'
1baafe
1baafe
ExecStop=/bin/sh -c '/usr/sbin/rndc stop > /dev/null 2>&1 || /bin/kill -TERM $MAINPID'
1baafe
1baafe
PrivateTmp=true
1baafe
1baafe
[Install]
1baafe
WantedBy=multi-user.target