- Created by Documentation, last modified on Nov 14, 2018
Introduction
The System
category's events occur during system updates or backups.
upcp
This event takes place when cPanel & WHM updates.
Available Stages:
pre
— Hook action code runs before the update process.Important
Unlike otherpre
stages, the success or failure of this event's hook action code cannot block execution of the cPanel & WHM event. The Standardized Hooks System cannot affect the cPanel & WHM update process.post
— Hook action code runs after the update process.
Action Code Runs As:
root
Blocking Attribute:
Escalate Privileges Attribute:
N/A
Output parameters
This event does not return output.
Backup
This event takes place when the system performs backups.
Available Stages:
pre
— Hook action code runs before the system performs backups.post
— Hook action code runs after the system performs backups.
Note:
Hooks for this event do not trigger when the Legacy Backup System runs.
Action Code Runs As:
root
Blocking Attribute:
Escalate Privileges Attribute:
N/A
Output parameters
This event does not return output.
Standardized Hooks
About Standardized Hooks
- The Standardized Hooks system triggers scripts or applications whenever a specific action is performed in cPanel & WHM.
- This functionality is useful for developers and system administrators.
Compatible with:
- cPanel 11.32+
- WHM 11.32+
Related Documentation
-
Page:
-
Page:Tweak Settings - Development —
Standardized Hooks - Debug Mode
The Standardized Hooks System’s debug mode helps to troubleshoot hook issues. For more information, read our Guide to Standardized Hooks - Debug Mode documentation.
You can select the following options:
- Debug mode is off. — The system does not display debug information or log it to the error log.
- Debug mode is on. The system displays information about a hook while it executes, but does not log debug data to the error log.
Debug mode is on. The system displays information about a hook while it executes and logs debug data to the error log.
Important:
This setting outputs a large amount of data.
- Debug mode is on. The system displays information about every stage for every hookable event, even if no hooks exist for that stage.
This setting defaults to Debug mode is off.
Note:
If, instead of this setting, you use the
/var/cpanel/debughooks
file to enable debug mode, your locale may revert to the English defaults for JavaScript elements. To fix this problem, run the following commands to disable debug mode and restart thecpsrvd
daemon:echo -n > /var/cpanel/debughooks /scripts/restartsrv_cpsrvd
-
Page:WHM API 1 Functions - reorder_hooks — This function changes the order of script hooks.
-
Page:WHM API 1 Functions - delete_hook — This function removes a script hook.
-
Page:WHM API 1 Functions - edit_hook — This function edits a script hook.