CPanel

From ISPWiki

Jump to: navigation, search

Contents

Authorization in the control panel when switching from BILLmanager

Auto authorization in cPanel is only allowed with Security Tokens disabled. In cPanel 11.32 and later Security Tokens are on by default. You can disable then in Tweak Settings->Security->Security Tokens->Off.

To enable automatic authorization of users in cPanel, add the following line into the billmgr.conf configuration file:

Option cPanelAutoLogin

Restart BILLmanager.

Functions of the integration module

Create account

The OpenAccount function

  • Locates the server, domain, user, package in the base.
  • Gets the information about account's IP-addresses (whether the account has assigned IP-addresses, their number) from the base.
  • Sends a request to the CPanel server to create an account (login, domain, package are taken from the base, password is generated, if necessary, assigned IP-address parameter request is sent to Cpanel. If any, it will be assigned, if no, the error will be generated and stored in /usr/local/ispmgr/var/cpcpanel.log.
  • Calls AddDetails to overwrite the package add-ons with those added manually (if any): bandwidth,disk,emaillimit, databaselimit,webdomainlimit.

Delete account

The DeleteAccount function

  • Locates the account in the database.
  • Sends a request to the CPanel server (deleting the account).
  • Deletes all the IP-addresses assigned to this account from itemip

Disable account

The SuspendAccount function

  • Locates the account in the database.
  • Sends a request to the CPanel server (the account is given status 3 which means that the account is disabled).

Enable account

The ResumeAccount function

  • Locates the account in the database.
  • Sends a request to the CPanel server (the account is given status 2 which means that the account is activated).

Change package

The SetAccountParam function

  • Locates the account in the database.
  • Sends a request to the CPanel server (change the package).
  • Calls AddDetails to overwrite the package add-ons with those added manually (if any)):bandwidth,disk,emaillimit, databaselimit,webdomainlimit.

Get package (preset) information from the CPanel server

The GetServerConfig function

  • Sends a request to the CPanel server (package names (account templates) are read on the CPanel server).
  • Lists all the packages from the server in the config column of the server table.

Check CPanel server connection to the

The CheckServerConnection function

  • Sends a request to the CPanel server to check the server connection.

Get statistics from the CPanel server

The GetStats function

  • Sends a request to the CPanel server (traffic usage statistics over the previous month is collected).
  • Sends a request to the database that returns the full traffic statistics that has been already collected in the billing. The difference between the data returned by the server and those in the base is calculated and recorded.

Additional information

Use the fix function to update the information. Log file : /usr/local/ispmgr/var/cpcpanel.log.

Was this helpful? Yes | No
Views
Personal tools