cPanel & WHM provides hooks that allow developers to execute custom code when the system migrates to and from EasyApache 4.
We introduced these hooks in cPanel & WHM version 58.
EasyApache 4's migration hooks only execute when you migrate a system to EasyApache 4, revert to EasyApache 3, or reinstall EasyApache 4 with either the
/scripts/migrate_ea3_to_ea4 script or WHM's EasyApache 4 interface (WHM >> Home >> Software >> EasyApache 4). For more information, read our How to Install or Uninstall EasyApache 4 documentation.
These hooks do not use the Standardized Hooks system.
To create an EasyApache 4 migration hook, perform the following steps on the command line as the
- Create the
/var/cpanel/ea4_migration_hooks/directory if it does not already exist.
Ensure that the directory has
Write a script that specifies the actions that you wish to perform.
You can place more than one script into the hook directory, and the system executes all of them. Place your script in one of the following directories:
|This hook triggers before migration from EasyApache 3 to EasyApache 4.|
|This hook triggers before you reinstall EasyApache 4.|
|This hook triggers before you revert from EasyApache 4 to EasyApache 3.|
|This hook triggers after migration from EasyApache 3 to EasyApache 4.|
|This hook triggers after you reinstall EasyApache 4.|
|This hook triggers after you revert from EasyApache 4 to EasyApache 3.|
- Scripts must possess
- If the system cannot execute the hook, then it will not run.
posthooks only run if the system will exit the migration script cleanly.
There is no content with the specified labels