The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

On setup new domain insert an XML file and a fodler

Discussion in 'cPanel Developers' started by AeonCube, Jul 8, 2010.

  1. AeonCube

    AeonCube Member

    Joined:
    Jul 18, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I am looking for some help with cPanel / WHM, I am only trying to do a small edit to cPanel but I do not know where to start.

    OS: CentOS

    The process of the edit I want to make:

    1) WHM - New domain gets added via WHM
    2) The edit / amend creates a directory in the /opt/soft/folder/folder/
    3) Creates a XML file within the folder just created host.xml with code within it.

    How would I go about this, or where would I start. Any direction would be great! As this is the first time developing for cPanel.

    Please note the server is not a production server, it is a testing server with cPanel installed.

    Thank you for any help!
     
  2. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    WHM's addaccount function is hookable via a script that can be placed at "/scripts/postwwwacct"

    This will be passed all attributes of the account via ARGV upon creation.

    Please see: cPanel/WHM Script Hooks

    for more information and some sample code.
     
  3. AeonCube

    AeonCube Member

    Joined:
    Jul 18, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Perfect! Just what I was looking for!
     
Loading...

Share This Page