HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2011-07-07 7c35d33ef98df0f275be6643d36a13d7e2e3af98
pac.create
1 files modified
9 ■■■■ changed files
hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java 9 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java
@@ -72,6 +72,13 @@
                        + 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 @@
                            "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;