2023-01-27 17:24:45 +00:00
|
|
|
# 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
|
|
|
|
Requires=named-chroot-setup.service
|
|
|
|
Before=nss-lookup.target
|
|
|
|
After=named-chroot-setup.service
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=forking
|
|
|
|
Environment=NAMEDCONF=/etc/named.conf
|
|
|
|
EnvironmentFile=-/etc/sysconfig/named
|
|
|
|
Environment=KRB5_KTNAME=/etc/named.keytab
|
|
|
|
PIDFile=/var/named/chroot/run/named/named.pid
|
|
|
|
|
2021-12-02 17:03:54 +00:00
|
|
|
ExecStartPre=/bin/bash -c 'if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/bin/named-checkconf -t /var/named/chroot -z "$NAMEDCONF"; else echo "Checking of zone files is disabled"; fi'
|
2023-01-27 17:24:45 +00:00
|
|
|
ExecStart=/usr/sbin/named -u named -c ${NAMEDCONF} -t /var/named/chroot $OPTIONS
|
|
|
|
|
|
|
|
ExecReload=/bin/sh -c 'if /usr/sbin/rndc null > /dev/null 2>&1; then /usr/sbin/rndc reload; else /bin/kill -HUP $MAINPID; fi'
|
|
|
|
|
|
|
|
ExecStop=/bin/sh -c '/usr/sbin/rndc stop > /dev/null 2>&1 || /bin/kill -TERM $MAINPID'
|
|
|
|
|
|
|
|
PrivateTmp=false
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|