The find_outdated_services Script
Valid for versions 82 through the latest version
Version:
82
Last modified: August 3, 2022
Looking for this interface?
Your hosting provider can enable or disable this interface for resellers in WHM's Edit Reseller Nameservers and Privileges interface (WHM >> Home >> Resellers >> Edit Reseller Nameservers and Privileges).
Overview
After a system update, cPanel & WHM runs the /usr/local/cpanel/scripts/find_outdated_services
script. This script checks all services to determine whether they require a restart. An outdated service is any service that depends on a library that is no longer present on the system.
This script ignores the following services:
auditd
dbus
exim-altport
imap
network
NetworkManager
pop
syslogd
tomcat
The script ignores the imap
and pop
services because the Dovecot lmtp
service handles them.
Run the script
To run this script on the command line, use the following format:
/usr/local/cpanel/scripts/find_outdated_services [options]
Options
Use the following options with this script:
Options |
Description | Example |
---|---|---|
--always-restart |
The script locates and restarts any outdated services. By default, the script prompts you to restart outdated services. | --always-restart |
--never-restart |
The script locates any outdated services but will not restart them. | --never-restart |
--auto |
By default, the script uses this option when it runs as part of the /usr/local/cpanel/scripts/maintenance script. It will locate and restart any outdated services. If the /var/cpanel/disabled/auto-restart-services touchfile exists, the system will not restart any outdated services. |
--auto |
The ignore_outdated_services file
This script uses the /etc/cpanel/local/ignore_outdated_services
file to exclude certain services from the script’s check. To exclude a service from this script, add it to the file.
The script does not apply this exclusion list to the chkservd
or restartsrv
services.
The /etc/cpanel/local/ignore_outdated_services
file uses the following format:
- Use the pound character (
#
) at the beginning of a line to mark it as a comment. - Enter only one service per line.
Note:
The service name must match its name as it appears in the process table. Use the
ps
command with the necessary flags to list processes (for example,ps -aux
). - Use Unix line endings (
\n
) to separate service entries. - The system skips blank lines.
Example
To block the cloud-init
and cloud-final
services from restart checks, create the /etc/cpanel/local
directory:
mkdir -p /etc/cpanel/local
Next, create the /etc/cpanel/local/ignore_outdated_services
file and add the cloud-init
and cloud-final
services with the following command:
echo -e "# Prevent cPanel from checking the cloud-init and cloud-final services\ncloud-init\ncloud-final" >> /etc/cpanel/local/ignore_outdated_services
The file’s contents will resemble the following:
|
|