A MyAdmin plugin that integrates cPanel license management into the MyAdmin billing and administration platform. It provides automated provisioning, activation, deactivation, IP changes, and billing reconciliation for cPanel licenses through the cPanel Manage2 API.
- Activate and deactivate cPanel licenses via the cPanel Manage2 API
- Change the IP address associated with a cPanel license
- Verify license status for a given IP
- Retrieve license data and account lists by IP
- KernelCare and Ksplice addon license management
- Admin view of all active cPanel licenses
- Unbilled license detection and reporting
- Symfony EventDispatcher integration for the MyAdmin plugin system
- PHP >= 5.0
- ext-soap
- symfony/event-dispatcher ^5.0
- detain/cpanel-licensing (cPanel Manage2 API wrapper)
Install with Composer:
composer require detain/myadmin-cpanel-licensingThe plugin registers itself with the MyAdmin framework through event hooks. It is loaded automatically by the plugin system when installed.
The plugin listens on the following events:
| Event | Handler | Description |
|---|---|---|
licenses.settings |
getSettings |
Registers cPanel configuration fields |
licenses.activate |
getActivate |
Provisions a new cPanel license |
licenses.reactivate |
getActivate |
Re-provisions an expired license |
licenses.deactivate |
getDeactivate |
Expires a cPanel license |
licenses.deactivate_ip |
getDeactivateIp |
Expires a license by IP |
licenses.change_ip |
getChangeIp |
Moves a license to a new IP |
function.requirements |
getRequirements |
Registers function autoloading |
ui.menu |
getMenu |
Adds admin menu entries |
The package also provides procedural helper functions:
activate_cpanel($ip, $package)- Activate a license for an IP with a given package IDdeactivate_cpanel($ip)- Deactivate a license by IPverify_cpanel($ip)- Check if a license is activeget_cpanel_license_data_by_ip($ip)- Get full license detailsget_cpanel_licenses()- List all licenses on the accountget_cpanel_accounts_for_license_ip($ip)- Get accounts for a licensed IP
composer install
vendor/bin/phpunitTo generate a coverage report:
vendor/bin/phpunit --coverage-html coverage/This package is licensed under the LGPL-2.1 license.