[Unit]
Description=Berkeley Internet Name Domain (DNS) server
Wants=nss-lookup.target
Before=nss-lookup.target
After=network.target

[Service]
Type=forking
PIDFile=/var/run/named/named.pid
ExecStartPre=/usr/sbin/named-checkconf -z /etc/named/named.conf
ExecStart=/usr/sbin/named -u named
ExecReload=/bin/sh -c '/usr/sbin/rndc reload > /dev/null 2>&1 || /bin/kill -HUP $MAINPID'
ExecStop=/bin/sh -c '/usr/sbin/rndc stop > /dev/null 2>&1 || /bin/kill -TERM $MAINPID'
PrivateTmp=true
TimeoutSec=25

[Install]
WantedBy=multi-user.target
