cPanel API 1/2 - Parked domain hooks

jdhf99

Well-Known Member
Mar 16, 2004
54
0
156
I'm trying to figure out what hooks are available for adding and deleting parked domains within cPanel.

I'm familiar with how to determine API calls by "viewing" theme files, I've read the documentation, and I've figured out some other API functions - I'm having trouble with parked domains though.

Adding and deleting sub/addon domains correctly execute the following hook files, as expected:

Code:
/usr/local/cpanel/hooks/subdomain/addsubdomain
/usr/local/cpanel/hooks/subdomain/delsubdomain
/usr/local/cpanel/hooks/addondomain/addaddondomain
/usr/local/cpanel/hooks/addondomain/deladdondomain
I cannot determine what path/filenames to use for executing a hook file on a parked domain change. I've tried every variant I can think of of "parkeddomain", "parkdomain", "park" ..etc, none are working for me.


Does anyone know what hook files are executed for parked domain modifications?

Edit: I found the "add" parked domain hook. I had previously tried it, but must have screwed something up as I did. For anyone that is curious: /usr/local/cpanel/hooks/park/park

After hunting a bit more (/usr/local/cpanel/Cpanel/Park.pm), it seems that the "delete" parked domain hook should be ./hooks/park/unpark. This does not seem to be working for me though.. Anyone know?

Edit 2: After I had given up for the night I received a testing email that I had the hooks sending me. DNS or mail server must have been backed up and took a little while. Looks like "unpark" is indeed the last hook I was looking for. I'll leave this here for future reference for anyone curious.
 
Last edited:

pakogah

Member
Nov 6, 2008
16
0
51
I have a question,

when cpanel delete an account that have sub-domain, addon domain, park
will it be also calling the hooks?
/usr/local/cpanel/hooks/subdomain/delsubdomain
/usr/local/cpanel/hooks/addondomain/deladdondomain
/usr/local/cpanel/hooks/park/unpark

and/or if you restore an account that have sub/addon/park domain, will this hooks also be executed?
/usr/local/cpanel/hooks/subdomain/addsubdomain
/usr/local/cpanel/hooks/addondomain/addaddondomain
/usr/local/cpanel/hooks/park/park
 
Last edited: