These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for create-domain.pl from txt file on the new forum.
Hi
I've been playing around with create-domain.pl and it works fine. Now I would like to read a comma separated file and use this to create my domains.
The domain.txt file could look something like this.
Username,fullname skm,Sebastian Kim Morsony jd,John Doe
I would then like to create a bash script, that runs through this file and executes create-domain.pl with username,fullname for username and description for each line of the file.
Anybody done something like this before?
Best Regards Sebastian Kim Morsony
There is already a batch creation mode in the GUI. Open the "Add servers" menu and click "Create From Batch File". Click "Help.." for a complete description of the file format (it's colon-delimited, much like a passwd file, but would be easy to generate from a CSV file, if you know how to use sed or a perl one-liner for substitution).
--
Check out the forum guidelines!
Hi
I would like to schedule the creation of virutal servers. Can this be done with batch creation?
Best Regards
Sebastian
That's the weirdest idea I've heard all day. Whatever for?
The answer, of course, is no (since I simply can't imagine a use case for such a capability). You'll need to wrap up your own script to do that. You could either use a shell script or borrow liberally from create-domain.pl and write something in Perl. I suspect the Perl solution would be most effective, if this isn't a one-off thing. Then run it from cron to achieve the scheduling.
--
Check out the forum guidelines!
Hi Joe
Thanks for you answer, but it's really not that weird.
I work at a school where we have around 5000 full time students per year. I would like to setup each user automatically with a virtual server, by using an csv file exportet, from out student database each night. The same goes for disabling/deleting.
This way I could provide all students with web space, and at the same time cleanup the virtual servers automatically.
Thanks
Sebastian