31 lines
1.0 KiB
SYSTEMD
31 lines
1.0 KiB
SYSTEMD
|
# Don't forget to add "$AddUnixListenSocket /var/named/chroot/dev/log"
|
||
|
# line to your /etc/rsyslog.conf file. Otherwise your logging becomes
|
||
|
# broken when rsyslogd daemon is restarted (due update, for example).
|
||
|
|
||
|
[Unit]
|
||
|
Description=Berkeley Internet Name Domain (DNS)
|
||
|
Wants=nss-lookup.target
|
||
|
Before=nss-lookup.target
|
||
|
After=network.target
|
||
|
|
||
|
[Service]
|
||
|
Type=forking
|
||
|
EnvironmentFile=-/etc/sysconfig/named
|
||
|
Environment=KRB5_KTNAME=/etc/named.keytab
|
||
|
PIDFile=/var/named/chroot/var/run/named/named.pid
|
||
|
|
||
|
ExecStartPre=/usr/libexec/setup-named-chroot.sh /var/named/chroot on
|
||
|
ExecStartPre=/usr/sbin/named-checkconf -t /var/named/chroot -z /etc/named.conf
|
||
|
ExecStart=/usr/sbin/named-sdb -u named -t /var/named/chroot $OPTIONS
|
||
|
|
||
|
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'
|
||
|
ExecStopPost=/usr/libexec/setup-named-chroot.sh /var/named/chroot off
|
||
|
|
||
|
PrivateTmp=true
|
||
|
TimeoutSec=25
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|