Introduction
In this article, you will be shown how to check your service's status using the cPanel restart scripts with the command-line.
The reason why you would want to use our provided scripts is that our software closely integrates with the OS that it is installed to. This means that while you can use the systemctl commands to stop, start, and restart services, the restartsrv scripts may perform actions that the systemctl commands may not.
It is therefore the better option to use these commands to perform the action in question.
For example; the restart script for MySQL will perform some sanity checks if it detects a failure to ensure that the configuration file does not contain invalid syntax or directives that may prevent the service from starting.
Additionally, you generally receive better error reporting and logging information when using the cPanel restart scripts.
Procedure
You would want to use the following command in order to check the services via the command line.
/usr/local/cpanel/scripts/restartsrv_service $options
The above command you will want to slightly modify for the service you are looking to check. All of the options available for the script are below.
apache_php_fpm
— Restarts the Apache PHP-FPM service.bind
— Restarts the BIND nameserver software.chkservd
— Restarts cPanel & WHM’s TailWatch log processing service.clamd
— Restarts the ClamAV® antivirus daemon.cpanalysticsd
— Restarts the cPanel Analytics daemon.cpanellogd
— Restarts the cpanellogd daemon.cpanel_dovecot_solr
— Restarts the Apache Solr™ service.cpanel_php_fpm
— Restarts the cPanel PHP-FPM service.cpdavd
— Restarts cPanel & WHM’s WebDAV server.cpgreylistd
— Restarts the cPanel Greylisting daemon.cphulkd
— Restarts cPHulk.cpipv6
— Binds or rebinds the server’s IPv6 addresses.cpsrvd
— Restarts thecpsrvd
daemon.crond
— Restarts thecrond
daemon.dnsadmin
— Restarts thednsadmin
daemon.dovecot
— Restarts the Dovecot® mail server.exim
— Restarts the Exim mail exchanger.eximstats
— Restarts the Eim mail statistics tracker.ftpd
orftpserver
— Restarts the configured FTP service (ProFTPd or Pure-FTPd).httpd
— Restarts the Apache web server.imap
orlmtp
orpop3
— Restarts the IMAP server (Dovecot).inetd
— Restarts the super-server daemon that manages Internet services.ipaliases
— Restarts the IP address aliasing software.mailman
— Restarts the Mailman service.mariadb
— Restarts the Mariadb service.mysql
— Restarts the Mysql service.-
named
— Restarts the BIND nameserver software. -
nscd
— Restarts the Name Service Cache daemon. -
p0f
— Restarts the passive OS fingerprinting service. -
pdns
orpowerdns
— Restarts the PowerDNS service. -
postgres
orpostgresql
— Restarts the PostgreSQL® database service. -
proftpd
— Restarts the ProFTP server daemon. -
pureftpd
— Restarts the Pure-FTP server daemon. -
queueprocd
— Restarts the queue processing daemon. -
rsyslog
— Restarts the open-source log forwarder daemon. -
spamd
— Restarts the Apache SpamAssassin™ daemon. -
sshd
— Restarts the Secure Shell (SSH) daemon. -
syslogd
— Restarts the log forwarder daemon. -
tailwatchd
— Restarts cPanel’s TailWatch log processing service. -
xinetd
— Restarts the open-source super-server daemon.
For further information on this script, you can review more in-depth here at this documentation:
Comments
0 comments
Article is closed for comments.