pac.create

This commit is contained in:
Peter Hormanns 2011-07-07 16:23:50 +00:00
parent 0080e988c4
commit 7c35d33ef9

View File

@ -72,6 +72,13 @@ public class PacProcessorFactory implements EntityProcessorFactory {
+ unixUser.getUserId() + ":" + unixUser.getUserId()
+ ":" + unixUser.getComment() + ":" + unixUser.getHomedir()
+ ":" + unixUser.getShell() + "\n");
Processor mkdirsProc = new ShellProcessor("chmod 711 " + unixUser.getHomedir() + " && " +
"su -l " + unixUser.getName() + " -s \"/bin/bash\" -c \"mkdir " +
unixUser.getHomedir() + "/etc " +
unixUser.getHomedir() + "/doms " +
unixUser.getHomedir() + "/users " +
"\""
);
try {
InputStream stream = TemplateProcessor.class.getClassLoader().getResourceAsStream("/de/hsadmin/mods/pac/email_new_pac_account.jtpl");
Template template = new Template(new InputStreamReader(stream));
@ -85,7 +92,7 @@ public class PacProcessorFactory implements EntityProcessorFactory {
"Zugangsdaten des neue Hostsharing Pakets " + pacName,
template.out())
);
Processor priProcessor = new CompoundProcessor(hostsAppender, interfacesAppender, sudoersAppender, newUsersProc);
Processor priProcessor = new CompoundProcessor(newUsersProc, hostsAppender, interfacesAppender, sudoersAppender, mkdirsProc);
WaitingTasksProcessor secProcessor = new WaitingTasksProcessor(priProcessor);
secProcessor.appendProcessor(pac.getHiveName(), emailPasswordProc, "send email to customer");
return secProcessor;