Child pages
  • The restartsrv Scripts
For cPanel & WHM version 70

Skip to end of metadata
Go to start of metadata

Overview

The /usr/local/cpanel/scripts/restartsrv_* scripts restart services. If a service won't restart from WHM, use one of these scripts to restart a service from the command line.

Run a script

To run a restart script on the command line, use the following format:

/usr/local/cpanel/scripts/restartsrv_service options

Services

You can restart the following services:

ServiceDescriptionExample
apache
Restarts the Apache® web server.
/usr/local/cpanel/scripts/restartsrv_apache
apache_php_fpmRestarts the Apache PHP-FPM service.
/usr/local/cpanel/scripts/restartsrv_apache_php_fpm
        
bind
Restarts the BIND nameserver software.
/usr/local/cpanel/scripts/restartsrv_bind
chkservd
Restarts cPanel & WHM’s TailWatch log processing service.
/usr/local/cpanel/scripts/restartsrv_chkservd
clamd
Restarts the ClamAV® antivirus daemon.
/usr/local/cpanel/scripts/restartsrv_clamd
cpanalyticsdRestarts the cPanel Analytics daemon.
/usr/local/cpanel/scripts/restartsrv_cpanalyticsd
        
cpanellogd
Restarts the cpanellogd daemon.
/usr/local/cpanel/scripts/restartsrv_cpanellogd
cpanel_dovecot_solrRestarts the Apache Solr™ service.
/usr/local/cpanel/scripts/restartsrv_cpanel_dovecot_solr
        
cpanel_php_fpmRestarts the cPanel PHP-FPM service.
/usr/local/cpanel/scripts/restartsrv_cpanel_php_fpm
        
cpdavd
Restarts cPanel & WHM’s WebDAV server.
/usr/local/cpanel/scripts/restartsrv_cpdavd
cpgreylistdRestarts the cPanel Greylisting daemon.
/usr/local/cpanel/scripts/restartsrv_cpgreylistd
        
cphulkd
Restarts cPHulk.
/usr/local/cpanel/scripts/restartsrv_cphulkd
cpipv6
Binds or rebinds the server's IPv6 addresses.
/usr/local/cpanel/scripts/restartsrv_cpipv6
cpsrvd
Restarts the cpsrvd daemon.
/usr/local/cpanel/scripts/restartsrv_cpsrvd
crond
Restarts the crond daemon.
/usr/local/cpanel/scripts/restartsrv_crond
dnsadmin
Restarts the dnsadmin daemon.
/usr/local/cpanel/scripts/restartsrv_dnsadmin
dovecot
Restarts the Dovecot® mail server.
/usr/local/cpanel/scripts/restartsrv_dovecot
exim
Restarts the Exim mail exchanger.
/usr/local/cpanel/scripts/restartsrv_exim
eximstats
Restarts the Exim mail statistics tracker.
/usr/local/cpanel/scripts/restartsrv_eximstats
ftpd or ftpserverRestarts the configured FTP service (ProFTPd or Pure-FTPd).
/usr/local/cpanel/scripts/restartsrv_ftpd
httpd
Restarts the Apache web server.
/usr/local/cpanel/scripts/restartsrv_httpd
imap or lmtp or pop3
          
Restarts the IMAP server (Dovecot).
/usr/local/cpanel/scripts/restartsrv_imap
inetd
Restarts the super-server daemon that manages Internet services.
/usr/local/cpanel/scripts/restartsrv_inetd
ipaliases
Restarts the IP address aliasing software.
/usr/local/cpanel/scripts/restartsrv_ipaliases
mailman
Restarts the Mailman service.
/usr/local/cpanel/scripts/restartsrv_mailman
mydns
Restarts the MyDNS server.
/usr/local/cpanel/scripts/restartsrv_mydns
mysql
Restarts the MySQL® database server.
/usr/local/cpanel/scripts/restartsrv_mysql
named
Restarts the BIND nameserver software.
/usr/local/cpanel/scripts/restartsrv_named
nscdRestarts the Name Service Cache Daemon.
/usr/local/cpanel/scripts/restartsrv_nscd
nsd
Restarts the nameserver daemon.
/usr/local/cpanel/scripts/restartsrv_nsd
p0f
Restarts the passive OS fingerprinting service.
/usr/local/cpanel/scripts/restartsrv_p0f
pdnsRestarts the PowerDNS service.
/usr/local/cpanel/scripts/restartsrv_pdns

postgres or postgresql

Restarts the PostgreSQL® database service.
/usr/local/cpanel/scripts/restartsrv_postgres
proftpd
Restarts the ProFTPd server daemon.
/usr/local/cpanel/scripts/restartsrv_proftpd
pureftpd
Restarts the Pure-FTPd server daemon.
/usr/local/cpanel/scripts/restartsrv_pureftpd
queueprocd
Restarts the queueprocd daemon.
/usr/local/cpanel/scripts/restartsrv_queueprocd
rsyslogd
Restarts the open-source log forwarder daemon.
/usr/local/cpanel/scripts/restartsrv_rsyslogd
spamd
Restarts the Apache SpamAssassin™ daemon.
/usr/local/cpanel/scripts/restartsrv_spamd
sshd
Restarts the Secure Shell daemon.
/usr/local/cpanel/scripts/restartsrv_sshd
syslogd
Restarts the log forwarder daemon.
/usr/local/cpanel/scripts/restartsrv_syslogd
tailwatchd
Restarts cPanel’s TailWatch log processing service.
/usr/local/cpanel/scripts/restartsrv_tailwatchd
tomcat

Restarts the Apache Tomcat® service.

Important:

As of cPanel & WHM version 76, EasyApache 4 now supports Tomcat 8.5. For more information, read our Tomcat documentation.

/usr/local/cpanel/scripts/restartsrv_tomcat
xinetd
Restarts the open-source super-server daemon.
/usr/local/cpanel/scripts/restartsrv_xinetd

Options

You can use the following options when you restart a service:

OptionDescriptionExample
--checkChecks whether the service is running.
/usr/local/cpanel/scripts/restartsrv_cpsrvd --check
--gracefulGracefully restart a service.
/usr/local/cpanel/scripts/restartsrv_cpsrvd --graceful
--hardPerforms a hard stop and restart for a service.
/usr/local/cpanel/scripts/restartsrv_cpsrvd --hard
--notconfigured-okServices that you did not configure will exit with a non-fatal error.
/usr/local/cpanel/scripts/restartsrv_cpsrvd --notconfigured-ok
--reloadReload a service.
/usr/local/cpanel/scripts/restartsrv_cpsrvd --reload
--restartRestart a service.
/usr/local/cpanel/scripts/restartsrv_cpsrvd --restart
--startStart a service.
/usr/local/cpanel/scripts/restartsrv_cpsrvd --start
--statusProvides a service's current status.
/usr/local/cpanel/scripts/restartsrv_cpsrvd --status
--stopStop a service.
/usr/local/cpanel/scripts/restartsrv_cpsrvd --stop

Additional documentation