I have a need. Don't know if this is the right place or not.
We have created an online order form for people or a salesperson to order a website online. When they press the Order button, we automatically populate the database with all order information and also create a home directory name where the site will live. However, it does not create the actual website. That's where I need someone.
I need a bash script that creates everything that Virtualmin normally creates. Ideally, I'd like it to be immediately visible within Virtualmin but I'll settle for importing it after the fact. The things it must do:
Must take these variables:
Domain Name Username: (create home dir with this same name) Password: set as adminpass as default
Optionally
Storage limits - same as virtualmin template Bandwidth limits - same as virtualmin template
Should chmod 777 the home dir created
Must copy a set of our default files and folders (index.php etc) into their new home directory
I can then call this bash file from php
Does virtualmin have some code built in for this ? If not, is there someone who would like to help me implement this ?
You may bid on this project here: https://www.freelancer.com/projects/System-Admin-Apache/Virtualmin-Bash-...
Thanks.
Jay CompuMatter
Comments
Submitted by andreychek on Sun, 07/10/2011 - 20:12 Comment #1
Howdy -- there's an API that can be used for doing many of those tasks... there's a command line API, as well as a remote API. Information on those are here:
http://www.virtualmin.com/documentation/developer/cli
http://www.virtualmin.com/documentation/developer/http
Other than that -- we don't have an existing script to do specifically what you need, you'd need someone to build a script to tie all those pieces together for you.
My recommendation would be to post your request here on the Jobs forum -- there's folks who monitor that who may be interested in the opportunity to build that for you:
http://www.virtualmin.com/forum/12
Submitted by JamieCameron on Sun, 07/10/2011 - 21:24 Comment #2
+1 to eric's suggestion that you use the existing Virtualmin command-line API. This would be superior to re-implementing the same code and then importing the domain ..