DirectAdmin

From ISPWiki

Jump to: navigation, search

Contents

Creating account

The OpenAccount function

  • Locates the server, domain, user, package in the base.
  • Gets information about account's IP-addresses (whether the account has assigned IP-addresses, their number) from the base.
  • Sends a request to the DirectAdmin server (information about IP-addresses on the server).
  • Sends a request to the DirectAdmin server, the account will be created (login, domain, package, email are taken from the database, password is generated, if necessary, an assigned IP-address is allocated from the previous request, or a shared IP-address is assigned. If an IP-address of the required type is not present, the FATAL error will be generated and specified in /usr/local/ispmg/var/cpadmin.log.

If more than one assigned IP-address is required, warning will be logged, and only one IP-address will be assigned.

  • Calls AddDetails to overwrite the package add-ons with those added manually (if any):bandwidth,disk,emaillimit,

databaselimit,webdomainlimit.

Deleting account

The DeleteAccount function

  • Locates the account in the database.
  • Sends the Xml request to the DirectAdmin server (delete the account).
  • Deletes all the IP-addresses assigned to this account from itemip

Disabling account

The SuspendAccount function

  • Locates the account in the database.
  • Sends the request to the DirectAdmin server to disable the account.

Enabling account

The ResumeAccount function

  • Locates the account in the database.
  • Sends a request to the DirectAdmin server to enable the account.

Changing package

The SetAccountParam function

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

Getting package (template) information from DirectAdmin

The GetServerConfig function

  • Sends a request to the DirectAdmin server (the package names (account templates) are read on the DirectAdmin server).
  • Listens all the packages received from the server in the config row of the server table.

Checking connection to the DirectAdmin server

The CheckServerConnection function

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

Getting statistics from DirectAdmin

The GetStats function

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

Additional information

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

Was this helpful? Yes | No
Views
Personal tools