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.

hook for AddOnDomain::addaddondomain

Discussion in 'cPanel Developers' started by pthirose, Sep 21, 2011.

  1. pthirose

    pthirose Member

    Mar 30, 2010
    Likes Received:
    Trophy Points:
    So I created /usr/local/cpanel/hooks/addondomain/addaddondomain

    First thing, I output all the xml stuff that got sent to the script, since it isn't necessarily clear what gets passed to this (I looked at the docs at ApiAddonDomain < ApiDocs/Api2 < TWiki but I also just wanted to make sure.)

    It appears ultimately that //newdomain// is the variable that contains the actual addon domain that got created.

    I just wanted to double-check that, because the way cPanel creates addon domains, it always also creates a subdomain with that prefix too.

    So if my primary domain is and I create an addon-domain, I get the in newdomain variable, and not the which ends up as one of the values listed in the DOMAINS list in the CPDATA section. Coincidentally (or always?) the value in newdomain appears to be last in the DOMAINS list as well, just as a sanity check for me.

    Anyway, just wanted to confirm that indeed newdomain is the FQDN of the domain that's being added. Or at least it's the text that gets entered in the text box in the Addon Domain GUI for the WHM end-user when he clicks on the AddOn Domain icon and fills in all that data (new domain name, subdomai/ftp username, ducment root, etcetc.)

    Thank you,

Share This Page