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.

cPanel API 1/2 - Parked domain hooks

Discussion in 'cPanel Developers' started by jdhf99, Jul 22, 2009.

  1. jdhf99

    jdhf99 Well-Known Member

    Joined:
    Mar 16, 2004
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
    #1 jdhf99, Jul 22, 2009
    Last edited: Jul 22, 2009
  2. pakogah

    pakogah Member

    Joined:
    Nov 6, 2008
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    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
     
    #2 pakogah, Apr 22, 2011
    Last edited: Apr 23, 2011
Loading...

Share This Page