d56ed2
[Unit]
d56ed2
Description=Berkeley Internet Name Domain (DNS) with native PKCS#11
d56ed2
Wants=nss-lookup.target
d56ed2
Wants=network-online.target
d56ed2
Wants=named-setup-rndc.service
d56ed2
Before=nss-lookup.target
d56ed2
After=network-online.target
d56ed2
After=named-setup-rndc.service
d56ed2
d56ed2
[Service]
d56ed2
Type=forking
d56ed2
EnvironmentFile=-/etc/sysconfig/named
d56ed2
Environment=KRB5_KTNAME=/etc/named.keytab
d56ed2
PIDFile=/run/named/named.pid
d56ed2
d56ed2
ExecStartPre=/bin/bash -c 'if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z /etc/named.conf; else echo "Checking of zone files is disabled"; fi'
d56ed2
ExecStart=/usr/sbin/named-pkcs11 -u named $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