cPanel & WHM

Restart Services Via SSH On a cPanel Server

cPanel and WHM is essentially a large number of different programs all running under a single graphical interface. The interface will invoke scripts when specific functions are done inside the software. If you click the restart ssh link inside WHM for example that will call the restart function for your ssh server which is the command /usr/local/cpanel/scripts/restartsrv sshd . This guide provides a list of all available services that can be restarted manually inside a cPanel VPS Servers from the command line. You should always attempt to first restart services using the /usr/local/cpanel/scripts/restartsrv. If this does not work you can attempt to force services to restart using /etc/rc.d/init.d/ for CentOS 6 or systemctl restart service-name.service for CentOS 7 cPanel servers.

Restart services in the WHM interface

Unless problems prevent this, you can restart most services in WHM’s Restart Services interface (Home >> Restart Services).

Restart cPanel services SSH

If a service will not restart from WHM, then you can use the /usr/local/cpanel/scripts/restartsrv service command to attempt to restart cPanel services using SSH. When you run this command, replace service with the correct value for that service, we have included all of the possible services you can restart with this script below with an example

Restart Apache on a cPanel Server

/usr/local/cpanel/scripts/restartsrv apache

Restart Bind on a cPanel Server

/usr/local/cpanel/scripts/restartsrv bind

Restart cPanel’s TailWatch log processing service

/usr/local/cpanel/scripts/restartsrv chkservd

Restart ClamAV on a cPanel Server

/usr/local/scpanel/scripts/restartsrv clamd

Restart the cPanel Log Daemon

/usr/local/scpanel/scripts/restartsrv cpanellogd

Restart cPanel’s WebDav Server

/usr/local/scpanel/scripts/restartsrv cpdavd

Restart cPHulk

/usr/local/scpanel/scripts/restartsrv cphulk

Rebind IPv6 Addresses

Run this script with the –list flag to list all of the cPanel server’s bound IPv6 addresses.

/usr/local/cpanel/scripts/restartsrv cpipv6

Restart cPanel’s cpsrvd daemon

/usr/local/cpanel/scripts/restartsrv cpsrvd

Restart cPanel’s crond daemon

/usr/local/cpanel/scripts/restartsrv crond

Restart cPanel’s dnsadmin daemon

/usr/local/cpanel/scripts/restartsrv dnsadmin

Restart the Dovecot mail server

/usr/local/cpanel/scripts/restartsrv dovecot

Restart the Entropy chat client

/usr/local/cpanel/scripts/restartsrv entropychat

Restart Exim

/usr/local/cpanel/scripts/restartsrv exim

Restart Exim Mail Statistics Tracker

/usr/local/cpanel/scripts/restartsrv eximstats

Restart FTP on a cPanel Server

/usr/local/cpanel/scripts/restartsrv ftpd or ftpserver
Restart the Apache Web Server
/usr/local/cpanel/scripts/restartsrv httpd

Restart IMAP on a cPanel Server

/usr/local/cpanel/scripts/restartsrv imap

Restart inetd (super-server) on a cPanel Server

/usr/local/cpanel/scripts/restartsrv inetd

Restart the IP Address aliasing software 

/usr/local/cpanel/scripts/restartsrv ipaliases

Restart the Mailman Server

/usr/local/cpanel/scripts/restartsrv mailman

Restartthe MyDNS Server

/usr/local/cpanel/scripts/restartsrv mydns

Restart the MySQL Database Server

/usr/local/cpanel/scripts/restartsrv mysql

Restart the BIND Nameserver Software

/usr/local/cpanel/scripts/restartsrv named

Restart the NSD Nameserver daemon

/usr/local/cpanel/scripts/restartsrv nsd

Restart the Passive OS Fingerprinting Service

/usr/local/cpanel/scripts/restartsrv p0f

Restart the PostgreSQL Database Service

/usr/local/cpanel/scripts/restartsrv postgres or postgresql

Restart the Queueprocd daemon

/usr/local/cpanel/scripts/restartsrv queueprocd

Restart the Open-Source Lod daemon

/usr/local/cpanel/scripts/restartsrv rsyslogd

Restart the Apache Spam Assassin™ daemon

/usr/local/cpanel/scripts/restartsrv spamd

Restart SSH on a cPanel Server

/usr/local/cpanel/scripts/restartsrv sshd

Restart the Log forwarder daemon

/usr/local/cpanel/scripts/restartsrv syslogd
Restart cPanel’s TailWatch log processing service
/usr/local/cpanel/scripts/restartsrv tailwatchd

Restart the Apache Tomcat service

/usr/local/cpanel/scripts/restartsrv tomcat

Restart the Open-Source Super-Server daemon

/usr/local/cpanel/scripts/restartsrv xinetd

Restart cPanel Services – Direct Service Restart

If the /usr/local/cpanel/scripts/restartsrv script does not restart the service, you can attempt to restart the service directly. For cPanel servers that run Rocky Linux, AlamLinux, CentOS, CloudLinux™, or Red Hat® Enterprise Linux (RHEL) 7 or 8 run the following command, where “service” is the path to the service:

systemctl restart service-name.service

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button