I'm trying to figure out if there is a way to to automated some of the post install steps of virtualmin. I install webmin and virtualmin several times a day for new server installations and it would be wonderful to make it a single command installation.
It pretty much already is, but there are a few settings I run through on each installation to make sure it is setup properly for our customer. One of the things that I do is step through all the post install questions for virtualmin. Is there a configuration file where I can specify these settings? (e.g. configure to run spamd and clamd)
Also when I run the install.sh script, is there a way that I can pass it the hostname as a parameter so I don't have to type it in when prompted?
Thanks, Patrick
Howdy,
Yeah, there's a few things in /etc/webmin and /etc/webmin/virtual-server that may be interesting to you.
The file /etc/webmin/virtual-server/config contains the config for a good many things that you're after.
Just remember that it only contains the settings that Virtualmin stored; if Virtualmin performed an additional action to make those settings work, you may still need to manually do that.
For example, that config file may contain the setting that says to use the spamd daemon -- but you still need to make sure spamd is running.
Also in virtual-server/backups are the backup jobs (which you'd still need to add to cron), and virtual-server/templates and virtual-server/plans are your templates and plans.
All those can be copied from one system to another -- just be sure to run re-check config after you're done.
Regarding the install.sh script -- I don't see any code in it to allow you to pass in the hostname from the command line. Which wouldn't be all that bad an idea :-)
One option would be to modify the install script, it wouldn't be hard.
Another option would be to file a support request to accept some additional arguments. I suspect Joe will do that, but the above option would probably be faster :-)
-Eric
Hi Eric, thanks for your quick reply. As for the virtualmin config file, how do I know if there is anything else that needs to be done? Is it just a matter of making sure the daemons are running? If that's all it shouldn't be too bad. I think the ideal solution would be to move the config file from server to server once I've set it up the way I like.
Also a question as to where I can find the config file for two webmin specific settings. One is the redirect all non ssl requests to the ssl url. The other one is to change the new user password encryption method from automatic to md5.
Actually the question about ssl redirects reminded me of another thing I've been wondering about. When the browser redirects, it will generally redirect using the hostname of the server. Is there a way to configure it to redirect using the ip instead?
Finally one last suggestion for the install script, if Joe does in fact incorporate the server hostname as a parameter. It would be very helpful to have a -y switch that answers yes to the initial question of whether I want to proceed or not. Thanks again for your time and support Eric.
Patrick
As for the virtualmin config file, how do I know if there is anything else that needs to be done?
Unfortunately, there's no hard and fast rule; it all depends on what was enabled, and whether enabling that particular item requires Virtualmin to modify something external to itself or not.
So it all comes down to trial and error :-)
It shouldn't be too hard to figure out though, and I've often copied config files to get another server up and running quickly.
As far as the ssl redirect goes -- I think what you're after is the ssl_redirect" param in /etc/webmin/miniserv.conf.
I'm not sure where the md5 encryption is.
Also, I don't believe there is a way to get it to redirect to the IP address, I think it always redirects to the hostname (or perhaps the name that the SSL cert is generated for).
-Eric
Eric thanks for your fast replies. I have one last question, where can I submit my requests for the install script features? Would Blue Skies forums be the appropriate place for that?
Patrick
Well, the difference between Blue Skies and a formal feature request is subtle :-)
Blue Skies, I suppose, is more of a "it'd be neat if some day, Virtualmin did X" -- sort of a suggestion of larger features and direction Virtualmin should be taking.
OTOH, I'd file a feature request if you have specific features you'd like to see in it in an upcoming release.
If in doubt, especially since you're a Pro customer, I'd suggest just filing a Feature Request :-)
-Eric