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.

list of domains

Discussion in 'General Discussion' started by DiegoM, Jul 17, 2007.

  1. DiegoM

    DiegoM Member

    Joined:
    Jul 13, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Maceió/AL - Brasil
    is there a script that list all domains parked on the host?
    i need something like this.

    *sorry about my poor english
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You can use the XML API to find a list of all accounts, then process each account using the API 2 function Cpanel::Park::listparkeddomains via the XML API to get a list of all parked domains on the server.

    You can find documentation for all of this at http://www.cPanel.net/plugins/devel
     
  3. beehave

    beehave Well-Known Member

    Joined:
    Jun 26, 2005
    Messages:
    104
    Likes Received:
    0
    Trophy Points:
    16
    The following command should work:

    cat /var/cpanel/users/* | grep DNS | awk -F [=] '{print $2}'
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Just note that if we decide to change the directory structure of cPanel/WHM in the future, your script may spontaneously break.

    Not saying we're planning on it. I just remember a lot of people being surprised when we changed something internally in version 11 that we didn't intend to have used by third parties and then everyone was saying their scripts were broken.

    This is why I always recommend an API whenever it is available, as we expect customers to use APIs. In addition, if we change something internally on the software, the API interface itself will likely remain the same.
     
Loading...

Share This Page