Consider the following scenario:
A customer has a domain.
The WHM/cPanel provider is to host the DNS and provide mail services.
The customer has a third party web developer and hosts the website.
The customer wants the website to be visible under www.domain.tld and domain.tld
Currently the only way to do this is to edit the zone file and change around some records. The @ IN A record must be changed to point to the web developers IP along with the www. Other CNAME records that rely on the @ pointing to the WHM server must be changed to A or to an alternate CNAME.
This I am fine with.
What I am not fine with is the way some key scripts react to these changes. The scripts that I have identified so far (there may be others) are as follows:
Change Site's IP Address
The various copy accounts from another server scripts
The various restore backup scripts
If you use any of these scripts and they come across a DNS set up as described above they obliterate it with no undo option.
These scripts should be amended to do the following:
Detect the setup which is believes is incorrect - this it already does
Hold the process before making any changes and bring up a prompt. The options should be 1) Abort the process and make no changes. 2) Proceed with the changes but do not make any alterations to custom settings. 3) Proceed with the changes and revert settings to the default, logging the exact changes made rather in case someone clicks the wrong button and needs to undo it manually.
Option 3 is effectively what the scripts currently do, with the addition of proper logging. Currently only the change IP script tells you that it has "corrected" some errors in the config, but doesn't tell you exactly what it has changed.
In the case of restore scripts that involve multiple accounts the checks and prompts could all be rolled into one at the beginning of the process so that the restoration is not continually suspended at points throughout the process.
At the moment I have nearly 100 accounts to change the IP address on. Before doing each one I have to open up the zone file, document any custom settings, make the change and then re-import the custom settings. It also means that I cannot use the change multiple site sites ip accounts page because all the websites will go down until I can put in the correct settings.



LinkBack URL
About LinkBacks







