aingeal

Member
PartnerNOC
Dec 12, 2007
7
0
51
Ann Arbor, Michigan
I was placed in charge of setting up the automation of cPanel VPS setup. The problem I am having is not with the cPanel setup side of a VPS. The problem I am having is with the initial WHM setup process. I looked through the forums but couldn't seem to find anything related to automating that initial setup (setting the nameservers, A records, IP's, etc.). Currently we do that process manually but looking to move it to a more automated process.

Could someone point me in the direction of either a script or module that would help with that initial setup?
 

aingeal

Member
PartnerNOC
Dec 12, 2007
7
0
51
Ann Arbor, Michigan
Thanks for the link. I ran across that about 2 hours after I made my post. I would not mind some suggestions on how to properly go about doing this. Let me lay out what I am trying to do and see what you think would be a good process.

The VPS's I need to automate are going to be running on SolusVM (openvz).
Users will only have cPanel access, no WHM access or sudo/root access of any kind.
WHMCS will be creating the VPS's through the SolusVM WHMCS module.
WHM setup will need to be done (which I now know can be done through the wwwacct.conf file)
cPanel will need to be setup for the user.
We want to do this in as automated, non-hands on way as we can.

I'm figuring we setup the VPS template to have cPanel base installed, but not configured.
A script will update the wwwacct.conf file with the needed "ADDR CONTACTEMAIL HOST NS NS2" information for this user.
The a script will run passing the information needed to the wwwacct script and create the cpanel account.

Is there anything I am either missing, or some way that would be a easier process to automate this? If you think this might be better in PM depending on how much detail you might need to get a good idea on how to best try and make this work, thats fine with me as well.
 

bryyyon

Member
Mar 1, 2011
6
0
51
I'm figuring we setup the VPS template to have cPanel base installed, but not configured.
A script will update the wwwacct.conf file with the needed "ADDR CONTACTEMAIL HOST NS NS2" information for this user.
The a script will run passing the information needed to the wwwacct script and create the cpanel account.
Pre-installing a template with cPanel is not a good idea.

You can use the file `/etc/rc.d/rc.local' to execute upon system initialization (boot). Create a designated SolusVM template with an rc.local that performs system package updates, installs cPanel, automates the Getting Started Wizard, creates whatever cPanel account(s) using the XML/JSON API, then removes itself.

It will only take an hour or two upon provisioning to set itself up.
 

aingeal

Member
PartnerNOC
Dec 12, 2007
7
0
51
Ann Arbor, Michigan
That script helped out with getting a lot set. Thank you. However I have one problem I haven't be able to get to work without manually disabling it in WHM. Anonymous FTP. Its disabled in the pure-ftp.conf file, but when the VPS is created, (even though the conf file says not to) its enabled under ftp server configuration, and is available in the users cPanel. How can I make this disabled by default and actually have it disabled?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
I'm not certain if this is what you are needing, but the template file that determines the settings for the pure-ftpd.conf file is set at /var/cpanel/conf/pureftpd/main location. The settings in that file will be used whenever pure-ftpd is built.