On setup new domain insert an XML file and a fodler

AeonCube

Member
Jul 18, 2007
10
0
51
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!
 

MattDees

Well-Known Member
Apr 29, 2005
416
1
243
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.