What is Tweak?

The tweak is a small modification made to improve a system. It refers to fine-tuning or adjusting a complex system. Tweaking sometimes refers to changing the values of underlying some variables to make the results of a program coincide with desired results. System administrators use tweak setting interface to make changes in the system.

Which file saves tweak settings?

Tweak settings are stored in /var/cpanel/cpanel.config file.

This file stores all the settings that exist in WHM. The settings in this file use key=value format. The system validates each key=value pair whenever changes are made in WHM’s Tweak setting interface.

If the entire /var/cpanel/cpanel.config file does not exist, the server performs the following steps:

  1. The server copies the contents of the /etc/cpanel.config default file and saves it as the /var/cpanel/cpanel.config file. 
  2. The server copies the contents of the cpanel.config.cache file, if it is present.
    • If the system cannot find the cpanel.config.cache file, an email notification will be received.
    •  You can change your email notification settings in WHM’s Contact Manager interface (Home >> Server Contacts >> Contact Manager).
  3. For any dynamic values that are not set, the server attempts to guess the correct value.
    • For example, to set the mailserver value, the server checks whether your system uses the dovecot RPM.
  4. The server logs the changes to the /usr/local/cpanel/logs/error_log file.

If one or more keys do not exist in the /var/cpanel/cpanel.config file, the server attempts to generate them from the following sources in the following order:

  1. The server copies the key=value pair from the cpanel.config.cache file, if it exists.
  2. If the key’s value is static, and it does not exist in the cpanel.config.cache file, the system copies the key=value pair from the default value in the /usr/local/cpanel/etc/cpanel.config file.
  3. If the key’s value is dynamic, and it does not exist in the cpanel.config.cache file, the server calculates an appropriate value.
  4. The server logs the changes to the /usr/local/cpanel/logs/error_log file.

Categorized in:

Tagged in:

, ,