The onboot_handler Script

Last modified: July 9, 2020

Overview

When the system boots, it runs the /usr/local/cpanel/bin/onboot_handler script. This script runs all of the scripts that exist in the /var/cpanel/on_boot and /usr/local/cpanel/libexec/on_boot directories. This allows a system administrator to easily manage scripts that they wish to run after the system starts.

The on_boot directory

System administrators should save scripts that they wish to run when the system boots in the /var/cpanel/on_boot directory.

If the directory does not already exist, run the following command as the root user to create it:

mkdir -p /var/cpanel/on_boot
Important:

cPanel & WHM saves any internal or development scripts to run on boot in the /usr/local/cpanel/libexec/on_boot directory. Do not save any scripts in this directory.

The cron job

The system uses the following entry in the root user’s crontab file to run the /usr/local/cpanel/bin/onboot_handler script:

@reboot /usr/local/cpanel/bin/onboot_handler​
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

The servers_queue Script

Valid for versions 82 through the latest version Last modified: June 21, 2021...

The auto-adjust-mysql-limits Script

Valid for versions 82 through the latest version Last modified: June 21, 2021...

The autossl_check Script

Valid for versions 82 through the latest version Last modified: May 13, 2020 Overview...

The backup Script

Valid for versions 82 through the latest version Last modified: May 13, 2020 Overview...

The backup_restore_manager Script

Valid for versions 82 through the latest version Last modified: July 28, 2022...