Ebox/Zentyal Override Stubs

Ever since Ebox Platform v2.0 was published, we have seen a lot of information on the net pertaining to customization. While Ebox, now Zentyal platform is an excellent base to start from, almost every installation we have done required some level of customization. As you may or may not know, all module configuration files on Ebox and Zentyal are generated using a Mason template as a skeleton for the actual configuration file. Respective files (We’ll call them stubs) are located in “/usr/share/ebox/stubs” for the Ebox platform or “/usr/share/zentyal/stubs” for the Zentyal platform. Under the “stubs” folder you will find a folder for each module installed by Ebox/Zentyal that requires configuration. While these files can be directly edited in the stubs folder, that is not the correct method of customizing the configuration. I say this is not correct because any update to a Ebox/Zentyal module will overwrite your custom changes that were made in that location. Thankfully, Ebox/Zentyal developers have enabled an override infrastructure that allows users to create custom stub files that are called in-lieu of the base module stub files. To implement these overrides, simply find the module that requires customization under “/usr/share/ebox/stubs/” or “/usr/share/zentyal/stubs/” and copy the folder to either “/etc/ebox/stubs” or “/etc/zentyal/stubs” respectively. By default the “stubs” folder does not exist under “/etc/ebox” or “/etc/zentyal”, so you will need to create it. Simply run the following commands by replacing [module-name] with the desired module:

mkdir /etc/ebox/stubs
cp -R /usr/share/ebox/stubs/[module] /etc/ebox/stubs


mkdir /etc/zentyal/stubs
cp -R /usr/share/zentyal/stubs/[module] /etc/zentyal/stubs

Once the stubs are copied, navigate to “/etc/ebox/stubs/[module-name]” or “/etc/zentyal/stubs/[module-name]” and start editing the *.mas file or files to create your custom configuration. Typically you would also remove the .mas files that are not being customized. Once you have saved you custom file/s, all you will need to do is restart the service associated with the module and Ebox/Zentyal will regenerate the configuration files for the module based on your custom stub! This technique applies to nearly all Ebox and Zentyal modules.

Did you find this article useful? Why not share it with your friends?

1 thought on “Ebox/Zentyal Override Stubs

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.