Introduction
cPanel supports multiple different DNS nameserver Softwares, which have differing service names. This can complicate the management of these services. The following discusses the proper way to manage your DNS Nameserver software.
Procedure
cPanel provides multiple scripts to manage each different nameserver software, but they are redundant.
For your reference, each of the individual scripts is:
# /scripts/restartsrv_bind
# /scripts/restartsrv_mydns
# /scripts/restartsrv_pdns
There is one general script that will automatically select the correct one of the above scripts. It is:
# /scripts/restartsrv_named
This script should be used over the others and systemd or init.d, as it not only selects the correct nameserver but performs any related actions that cPanel requires when a nameserver starts. If available, use the "/scripts/restartsrv" scripts over systemd or init.d for this reason.
Check Nameserver Status
# /scripts/restartsrv_named --status
pdns (/usr/sbin/pdns_server --guardian=no --daemon=no --disable-syslog --log-timestamp=no --write-pid=no) is running as named with PID 2051797 (systemd+/proc check method).
Restart Nameserver
# /scripts/restartsrv_named
Waiting for “pdns” to restart ………waiting for “pdns” to initialize ………finished.
Service Status
pdns (/usr/sbin/pdns_server --guardian=no --daemon=no --disable-syslog --log-timestamp=no --write-pid=no) is running as named with PID 2051929 (systemd+/proc check method).
Stop Nameserver
# /scripts/restartsrv_named --stop
Waiting for “pdns” to stop ………finished.
Start Nameserver
# /scripts/restartsrv_named --start
Waiting for “pdns” to start ……waiting for “pdns” to initialize ………finished.
Service Status
pdns (/usr/sbin/pdns_server --guardian=no --daemon=no --disable-syslog --log-timestamp=no --write-pid=no) is running as named with PID 2052039 (systemd+/proc check method).
Force Reload Nameserver
# /scripts/restartsrv_named --hard
Waiting for “pdns” to restart ………waiting for “pdns” to initialize ………finished.
Service Status
pdns (/usr/sbin/pdns_server --guardian=no --daemon=no --disable-syslog --log-timestamp=no --write-pid=no) is running as named with PID 2052321 (systemd+/proc check method).
Comments
0 comments
Article is closed for comments.