BuycPanel Blog

BuycPanel Blog

Latest news and updates

Steps to Register a WHM Plugin with AppConfig

Posted by Allura on 12 08 2019.

Introduction
This feature is available for cPanel and WHM version 11.32 and later, and is required for version 11.38.1 and later. One has to log in as a root user to register plugins with AppConfig. It configures the plugins ACL requirements and other plugin variables.Register With AppConfig
Step 1: Configure the AppConfig Directory
One needs to configure the AppConfig directory and if it does not exist, one has to create the /var/cpanel/apps/ directory. In that case, one has to use the chmod  command to set it to 755 permissions.
Step 2: Create the AppConfig Configuration File
There is a need for a user to create an AppConfig configuration file. It will store each plugin’s or application’s AppConfig settings. One can read our Guide to WHM Plugins – AppConfig Configuration File documentation to gather more information on this.One must keep in mind that the existence of configuration files must be in the /var/cpanel/apps/ directory and it…

Introduction

This feature is available for cPanel and WHM version 11.32 and later, and is required for version 11.38.1 and later. One has to log in as a root user to register plugins with AppConfig. It configures the plugins ACL requirements and other plugin variables.

Register With AppConfig

Step 1: Configure the AppConfig Directory

One needs to configure the AppConfig directory and if it does not exist, one has to create the /var/cpanel/apps/ directory. In that case, one has to use the chmod  command to set it to 755 permissions.

Step 2: Create the AppConfig Configuration File

There is a need for a user to create an AppConfig configuration file. It will store each plugin’s or application’s AppConfig settings. One can read our Guide to WHM Plugins – AppConfig Configuration File documentation to gather more information on this.

One must keep in mind that the existence of configuration files must be in the /var/cpanel/apps/ directory and it must use the .conf file extension.

Step 3: Register the Plugin in AppConfig

One has to run this command in order to register the plugin with AppConfig, where example.conf will represent the configuration file’s name:

/usr/local/cpanel/bin/register_appconfig ~/example.conf

While running this command, the AppConfig system will perform the following functions:

  • It will validate the configuration file and will store a version of it in the /var/cpanel/apps/  directory.
  • It will regenerate the WHM plugin cache.
  • It will restart the cpsrvd daemon.

Important to note that changes will not be applied by the system to AppConfig configuration files until the restarting of  cpsrvd daemon.

Check Plugin Registration

After registering the plugin correctly, the system will add the configuration file to the /var/cpanel/apps/  directory. One needs to run this command to check whether a plugin has been registered with AppConfig correctly:

ls -al /var/cpanel/apps

The command’s output will be like this as shown below:

total 12

drwxr-xr-x  2 root root 4096 Aug  6 22:41 ./

drwxr-xr-x 83 root root 4096 Aug  7 18:00 ../

-rw——-  1 root root  259 Aug  6 22:41 example.conf

Conclusion

Steps to register a WHM plugin with AppConfig is outlined in this article.