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.

New Accounts and Subdomains

Discussion in 'General Discussion' started by jlimited, Jun 15, 2004.

  1. jlimited

    jlimited Well-Known Member

    Joined:
    Jun 4, 2004
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    I have a problem. I am the only on that has control over my name servers. They are not running on my server. I have to login in and make changes via web portal.

    My problem is that, I have reseller accounts and clients that make sub-domains. In order for their accounts or their sub domain to resolve, I need to be able to add an NS record for them.

    I would like to be emailed when someone adds an account or a sub domain.

    Is there a way to do this?

    Thanks
    Travis
     
    #1 jlimited, Jun 15, 2004
    Last edited: Jun 15, 2004
  2. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Every time an account is created in WHM the script /scripts/wwwacct is what does the job, and if a script called postwwwacct exists, it gets called after the wwwacct one is done. Therefore, a postwwwacct script could be used to email you every time a new account is created from WHM.

    To be notified when a subdomain is created in cpanel is a different task.
     
  3. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    To effectively run a server in a shared hosting environment, you really should run your own name servers.
     
  4. jlimited

    jlimited Well-Known Member

    Joined:
    Jun 4, 2004
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    I know running my own nameservers would be the best. But I do not have to funds to do so. That is why I am using other nameservers.

    How can I set up a master DNS server on the same box?

    Thanks
     
  5. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    Funds? The only funds involved ought to be if you need someone to set it up for you. cPanel has everything you need to do it.

    Or if you are a reseller, that could be a problem if your host does not want to allow you to do it, but even in that case, you should be allowed to use his nameservers.
     
  6. jlimited

    jlimited Well-Known Member

    Joined:
    Jun 4, 2004
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    I do not want my web server being on the same machine as my name server. So that means that I need to have 3 servers, 1 - Web Server 2 - NS1. 3- NS2.

    I do not have the money to get these 3 servers. That is why I am using their DNS. This leads me back to my problem. According to tech support, there is no automatic way to update their DNS servers.

    So, how can I add to postwwwacct script, so that it will email me a request to check for new accounts?

    What language is wwwacct written in?

    If looks like PHP or something like it.

    Thanks
     
  7. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    The wwwacct script is written in perl. There is a part, around line 1488, that says:

    Code:
    if (-e "/scripts/postwwwacct") {
    	system("/scripts/postwwwacct",@ARGV);
    }
    
    If there is a postwwwacct script, it will call that script and pass along @ARGV. That array contains the following variables:
    ARGV0 = domain
    ARGV1 = username
    ARGV2 = pass
    ARGV3 = space (MB)
    ARGV4 = theme
    ARGV5 = ded IP (y/n)
    ARGV6 = cgi (y/n)
    ARGV7 = FP (y/n)
    ARGV8 = max ftp (n or #)
    ARGV9 = max sql (n or #)
    ARGV10 = max POP (n or #)
    ARGV11 = max lists (n or #)
    ARGV12 = max subs (n or #)
    ARGV13 = bandwidth (# or 0)
    ARGV14 = shell (y/n)
    ARGV15 = owner
    ARGV16 = plan
    ARGV17 = max park (# or unlimited)
    ARGV18 = max addon (# or unlimited)
    ARGV19 = feature list (default)
    ARGV20 = contact email

    Check the postwwwacct scripts in my scripts club for examples. If you know perl, a script to notify you of new accounts would be simple. I think the postwwwacct script can also be php but I'm not sure.
     
  8. jlimited

    jlimited Well-Known Member

    Joined:
    Jun 4, 2004
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    Thanks Squirrel.

    I will have to read up on perl. But, I have a idea of where to go.
     
Loading...

Share This Page