The Control Panel Add-On scripts are written in Perl and distributed under an Apache open source license, allowing you to modify the code. You can adapt the Control Panel integration feature for Control Panels that are not presented in the list of supported Control Panels.
The Control Panel integration scripts are open source, and there are many options to make the integration work in different ways. We hope it encourages people to enhance the scripts and share the new scripts with other users.
You can modify the existing Control Panel integration scripts in a number of ways.
Example 1. By default, only Control Panel users can see the same virtual site directory as if they were using SSH or FTP to access their virtual site. They can only Restore files into their virtual site account or directory. By modifying the Control Panel scripts in addition to the web content, other directories on the same server can be linked into the Control Panel account for file Restores.
The existing Parallels Plesk Panel script uses this functionality to allow users to restore email.
Example 2. Another option is to make the script check the username against an allowed list of users. File Restores could be an option only given to Control Panel accounts that paid for this option or have a premium account.
To integrate your custom Control Panel with R1Soft Backup software, complete the following two (2) steps:
1. On a system where the Linux Agent is installed, go to the /usr/sbin/r1soft/lib/controlpanel directory.
2. There you can find the .pl scripts for integrating with all supported Control Panels. For each panel, there are two scripts:
- <PanelName>-auth.pl - Perl script for Control Panel authentication.
- <PanelName>-listusers.pl - Perl script for retrieving Control Panel users.
You can modify these scripts to fit your needs. You can use these scripts as examples (templates) to create scripts for integration with your custom Control Panel.
3. Once you have adapted Perl scripts to your needs, place them in the /usr/sbin/r1soft/lib/controlpanel/custom folder. So, as a result, there will be two (2) files with a .pl extension in the custom folder:
- custom-auth.pl - Perl script for authentication with a custom Control Panel.
- custom-listusers.pl - Perl script for retrieving users of the custom Control Panel.
You can use other file names.
Follow the instructions below to enable your integration scripts. First, create a new "Custom" Control Panel instance in a Policy. For more information, see Adding Control Panel Instances.
1. On the "Control Panels" tab of the "Edit Policy" window, click on the "Add Control Panel Instance" button.
2. The "Add Control Panel Instance" window will appear. Familiarize yourself with the introductory information, and click "Next" to proceed with adding the Instance.
3. On the following "Instance Details" screen, select the "Custom" type in the drop-down menu.
Having selected the "Custom" type, specify the custom Perl scripts you have created in the first step.The scripts must be located in the /usr/sbin/r1soft/lib/controlpanel/custom directory on the Agent machine. Default names are as follows:
4. Specify other options in the "Add Control Panel Instance" wizard and save the Instance.
3. Verify the created Instance by clicking on the "Verify" button in the "Control Panels" tab. This will verify that the Instance actually exists on the specified Agent.
Alternatively, you can verify the Instance be clicking on the "Verify Instance" button in the "Add Control Panel Instance" wizard.
4. Once the system has found your custom Perl scripts in the /usr/sbin/r1soft/lib/controlpanel/custom directory on the Agent machine, the following success message is displayed. Click "OK."
5. Click "Save" in the Policy window to save the changes.