Repair script or routine

3 posts / 0 new
Last post
#1 Mon, 08/18/2008 - 02:32
David.Strejc

Repair script or routine

Is there something like "repair script" or can I do this somehow in virtualmin gui?

I mean - now I have some domains which I've created in virtualmin GPL version and they are setuped to use standard apache logging routine, but I want them all to use piped perl logging. If there were domains named not by numbers but by their domain names I would not ask this question because I can repair httpd.conf fast myself. But now it contains finding hash of domain_name => webmin_domain_number and replacing those values in httpd.conf.

Mon, 08/18/2008 - 09:44
Joe
Joe's picture

This is configurable on the <b>Server Configuration:Website Options</b> page, in the option labeled <i>Write logs via program? (Handles missing log directory)</i>

If you have a <i>lot</i> of domains to update, the command line tools might help--I don't know, off-hand, if the modify-domain command will do the trick...but it might, if you have a Server Template that has the configuration you'd like to apply.

Something like:

virtualmin modify-domain --domain domain.tld --template NewTemplate

Or wrap it in a for loop to get a bunch of domains:

for i in &quot;domain.tld domain2.tld domain3.tld&quot;; do
virtualmin modify-domain --domain $i --template NewTemplate
done

It doesn't look like modify-domain can use the &quot;all-domains&quot; option found in most of the commands.

I actually expected this to be explicitly and directly available in the modify-web command, as most of the options in the Website Options UI are there. But for some reason logging is not. But, nonetheless, modify-web is not in Virtualmin GPL, currently, so you'd need to use the more roundabout way, anyway. And again, I'm not actually certain it'll work...let us know if it doesn't, and I'll come up with something else!

--

Check out the forum guidelines!

Mon, 08/18/2008 - 22:54 (Reply to #2)
David.Strejc

I don't have virtualmin GPL ;o)) we got upgraded all servers to PRO version - it is much better. And this problem is because of that - now there are much more functions available for template setup of website. So I want to have all servers have the nearly same configuration (less problems with writing scripts for modifying anything).
Thanks for advice I got that idea about

for i in `ls $domainfolder | grep virtualmin`
do modify-domain $i --new-template template
done

I will try this and let everybody know.

I was only dreaming about some &quot;repairing/modifying&quot; functions in server validation section in virtualmin GUI.

Thanks again.

Topic locked