|This tutorial adds custom hooks to preserve a customized configuration file.|
The cPanel & WHM update process (
upcp) sometimes overwrites customized files with the cPanel-provided default versions. If you experience this problem, use our Standardized Hooks system to preserve your customizations.
To solve this problem, this tutorial creates the following hooks:
pre-stage hook that runs immediately before the
upcpscript to copy the customized Horde configuration file (
/usr/local/cpanel/base/horde/turba/config/backends.php) to the
post-stage hook that runs immediately after the
upcpscript to copy the
backends.php.tempfile back into the
backends.phpfile, and then deletes the
This tutorial creates a Perl module, but you can also write hook action code in PHP or any other preferred programming language. For more information, read our Hook Action Code documentation.