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