how can we restart bind-9.14.11

Reindl Harald h.reindl at thelounge.net
Mon Mar 16 13:58:47 UTC 2020



Am 16.03.20 um 14:48 schrieb ShubhamGoyal:
>  Dear sir,
>                            I installed bind version 9.14.11 by tar file
> . it is working okk.
>                             i tried
>                             1. systemctl restart named
>                              2.  /etc/rc.d/init.d/bind restart
>                              3.  service named restart
>  
>                             But I do not able to restart service.
>                               please tell me how can i restart bind 9.14.11

by write a simple systemd-unit and forget about /etc/rc.d and most
important: by not start it by hand to begin with because systemd has no
clue about random processes

[root at srv-rhsoft:~]$ cat /etc/systemd/system/named.service
[Unit]
Description=DNS Server

[Service]
Type=simple
ExecStart=/usr/sbin/named -4 -f -u named -t /var/named/chroot
ExecReload=/usr/bin/kill -HUP $MAINPID
ExecStop=/usr/bin/kill -TERM $MAINPID
TimeoutSec=25
Restart=always
RestartSec=1

PrivateTmp=yes
ReadOnlyPaths=/etc
ReadOnlyPaths=/usr


[Install]
WantedBy=multi-user.target


More information about the bind-users mailing list