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.

Addon domain addition

Discussion in 'General Discussion' started by phaoost, Feb 12, 2007.

  1. phaoost

    phaoost Registered

    Joined:
    Oct 20, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    Is there any way to add addon domains with a script? I need to add a bunch of domains and it will take too much time to add them in cpanel, please advise.
     
  2. phaoost

    phaoost Registered

    Joined:
    Oct 20, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Ok, I found AddonDomain.pm in /usr/local/cpanel/Cpanel, but how it supposed to get used?

    I tried:

    perl
    use lib '/usr/local/cpanel';
    use Cpanel;
    use Cpanel::AddonDomain;
    ($res, $reas) = Cpanel::AddonDomain::api2_addaddondomain ({newdomain => 'aaa.com',subdomain=>'bbb',disallowdot=>'1',dir=>'public_html/aaa'});

    print $reas;

    and got:

    Undefined subroutine &main::modloader called at /usr/local/cpanel/Cpanel.pm line 240.

    So what to do next? I have greped /usr/local/cpanel for modloader and found nothing :(
     
Loading...

Share This Page