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.

Global Editing; Must be a way!

Discussion in 'General Discussion' started by dgtech, Aug 21, 2004.

  1. dgtech

    dgtech Member

    Joined:
    Apr 5, 2002
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    We have gone through a DedicatedNow IP migration, of which failed misarabliy for us. We are now stuck changing around 600 domains names IP's and resold domains name servers, and this will not be a pretty job. This is also causing our customers to be down.

    Here is what I am asking. Is there a way to globally edit resellers resold accounts to input the resellers nameservers and also a way to globally edit the IP's of domains so that we do not have to move them all to the correct main shared IP?

    After looking at a few files, it appears to me a very simple task for a script.

    For Nameservers:

    It would first open the /var/cpanel/resellers-nameservers, find the reseller's username, and then go through the account list and find all domains owned by that reseller, and change their nameservers. Then find all of the addon/parked domains for that resold domain (via httpd.conf or some other means) and change their ns too, so that they match the resellers nameservers. Perhaps even a manual selection of resellers to change the DNS.

    For IPs:

    It could locate all domain names owned by a reseller, and then you manually select an ip to change it to or it will automatically change the resold domains to the shared IP. You could even select the IP's it's self, and simply go through the same process as "Change Site's IP Address."

    I would greatly appreciate any help on this.

    David
     
  2. zentity

    zentity Well-Known Member

    Joined:
    Jun 16, 2004
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    You can try this and modify it for your needs, I made it to change resellers IP's and their accounts ips when moving them to other servers, you could add the httpd.conf bit too - Its pretty straight forward.

    http://www.zentity.com/stevedl/modify_dns

    I wrote it in a hurry one morning and haven't updated it for a while with more functions or cleaner code checking.. since it works for what i wanted it to do :) < edit: just made a slight change that will do addon domains and parked domains too. / edit>

    To change the IP's in apache, I would build a new httpd.conf and Include it within httpd.conf rather than add it directly, till all your accounts are done.

    If you modify the dns ips and also the ips in /var/cpanel/users/* you should be able to run

    /scripts/rebuildhttpdconf > httpd.conf.new to get the apache config.. maybe that will work :)

    I could script this if needed on the fly.
     
    #2 zentity, Aug 21, 2004
    Last edited: Aug 21, 2004
Loading...

Share This Page