|
| 1 | +# MyAdmin DirectAdmin Webhosting Plugin |
1 | 2 |
|
2 | | -API Info and Docs at https://www.directadmin.com/api.php |
| 3 | +[](https://github.com/detain/myadmin-directadmin-webhosting/actions/workflows/tests.yml) |
| 4 | +[](https://opensource.org/licenses/LGPL-2.1) |
3 | 5 |
|
4 | | -httpsocket from http://files.directadmin.com/services/all/httpsocket/httpsocket.php |
| 6 | +MyAdmin plugin for DirectAdmin web hosting management. Provides automated provisioning, suspension, reactivation, termination, and single-sign-on (SSO) login for DirectAdmin-based hosting accounts through the DirectAdmin API. |
5 | 7 |
|
6 | | -sample at http://www.directadmin.com/sample_api.txt |
| 8 | +## Features |
7 | 9 |
|
8 | | -more examples at http://files.directadmin.com/services/all/httpsocket/examples/ |
| 10 | +- Automated account creation (user and reseller) via DirectAdmin API |
| 11 | +- Service suspension, unsuspension, and termination |
| 12 | +- One-time URL login key generation for SSO |
| 13 | +- IP address change support |
| 14 | +- Event-driven architecture using Symfony EventDispatcher |
| 15 | +- Built-in HTTPSocket class for DirectAdmin API communication |
| 16 | + |
| 17 | +## Requirements |
| 18 | + |
| 19 | +- PHP >= 5.0 |
| 20 | +- ext-curl |
| 21 | +- Symfony EventDispatcher ^5.0 |
| 22 | + |
| 23 | +## Installation |
| 24 | + |
| 25 | +```bash |
| 26 | +composer require detain/myadmin-directadmin-webhosting |
| 27 | +``` |
| 28 | + |
| 29 | +## Usage |
| 30 | + |
| 31 | +The plugin registers event hooks automatically when loaded by the MyAdmin plugin system. It listens for webhosting lifecycle events (activate, deactivate, reactivate, terminate) and handles DirectAdmin API interactions. |
| 32 | + |
| 33 | +## API Reference |
| 34 | + |
| 35 | +- **Plugin** - Main plugin class providing event handlers for the MyAdmin system |
| 36 | +- **HTTPSocket** - HTTP client class for communicating with the DirectAdmin API over curl |
| 37 | + |
| 38 | +## Running Tests |
| 39 | + |
| 40 | +```bash |
| 41 | +composer install |
| 42 | +vendor/bin/phpunit |
| 43 | +``` |
| 44 | + |
| 45 | +## License |
| 46 | + |
| 47 | +This package is licensed under the [LGPL-2.1](LICENSE). |
| 48 | + |
| 49 | +## Links |
| 50 | + |
| 51 | +- [DirectAdmin API Documentation](https://www.directadmin.com/api.php) |
| 52 | +- [InterServer](https://my.interserver.net/) |
0 commit comments