How to automatically create a custom directory for new virtual servers?

3 posts / 0 new
Last post
#1 Mon, 01/07/2013 - 20:39
michael.heuberger

How to automatically create a custom directory for new virtual servers?

Hello guys

How can I configure Virtualmin to automatically create a custom directory inside the home folder whenever I create a new virtual server?

For example I create test.com, then the home directory is /home/test/ - and then I want a custom folder there, for example /home/test/custom

What's the best way to configure so?

Thanks for your help Michael

Mon, 01/07/2013 - 22:22
andreychek

Howdy,

Anything in the directory /etc/skel will be copied into any new Virtual Server's that are created.

So in your case, you can just create a dir "/etc/skel/custom".

-Eric

Sat, 01/12/2013 - 08:13
Locutus

An alternative, should Eric's good suggestion not work for some reason, is to use a post-server-creation script which you can set in the Virtual Configuration, section "Actions upon server and user creation". You'll find documentation about those scripts there too.

Topic locked