Where to execute script after cPanel update of Roundcube?

swbrains

Well-Known Member
Sep 13, 2006
202
27
178
Whenever cPanel updates Roundcube, it overwrites the config.inc.php file for Roundcube which has several default values that I have customized, so they are set back to default values every time this happens.

I have created a bash script that replaces specific lines in config.inc.php with customizations that I want to retain after an update.

Without needlessly executing this script from a cron job every day (even though it only takes a second to run), is there a place I can add my script so that it will be executed only *after* cPanel updates Roundcube, in order to immediately replace the proper lines in the newly-installed default config file?

Thanks!
 

cPanelSamA

Moderator
Staff member
Oct 30, 2019
17
6
78
Houston, Texas
cPanel Access Level
Root Administrator
Hey @swbrains !

As I understand, you're wanting to customize the RoundCube configuration without upcp overwriting its contents.

If you're running on cPanel v11.46 through v56 there are a couple of files that you can apply these changes to where upcp will ignore. For additional guidance on this, you can refer to our below documentation:

How to Customize Roundcube Webmail

However, if you're on cPanel v56 or above because of how RoundCube now operates, we no longer have designated files to customize the configuration without it getting overwritten. Instead, you'll need to create a custom RPM with your configurations and install them onto your server. Guidance with this procedure can be found in our below documentation:

How to Build and Install Custom RPMs
 

swbrains

Well-Known Member
Sep 13, 2006
202
27
178
Building and installing a custom RPM seems like a pretty complicated process just to ensure some commands are run after a cPanel update. If there's no alternative, I'll just create some type of cron job to do it every day a few hours after upcp is run. It would be nice to see an easier method to "hook" into the upcp process by having cPanel launch a script after upcp completes that can be edited by an administrator.