Queues fuer Mail- und DNS-Server konfigurierbar
This commit is contained in:
parent
a9e0da750f
commit
8d2d1e28cc
@ -17,6 +17,7 @@ import de.hsadmin.core.qserv.ProcessorException;
|
|||||||
import de.hsadmin.core.qserv.ShellProcessor;
|
import de.hsadmin.core.qserv.ShellProcessor;
|
||||||
import de.hsadmin.core.qserv.TemplateProcessor;
|
import de.hsadmin.core.qserv.TemplateProcessor;
|
||||||
import de.hsadmin.core.qserv.WaitingTasksProcessor;
|
import de.hsadmin.core.qserv.WaitingTasksProcessor;
|
||||||
|
import de.hsadmin.core.util.Config;
|
||||||
import de.hsadmin.mods.email.EMailAddress;
|
import de.hsadmin.mods.email.EMailAddress;
|
||||||
import de.hsadmin.mods.email.EMailAddressProcessorFactory;
|
import de.hsadmin.mods.email.EMailAddressProcessorFactory;
|
||||||
import de.hsadmin.mods.pac.INetAddress;
|
import de.hsadmin.mods.pac.INetAddress;
|
||||||
@ -47,10 +48,11 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
|
|||||||
WaitingTasksProcessor mainProcessor = new WaitingTasksProcessor(createHiveDNSSetupProcessor(domName, templateVars));
|
WaitingTasksProcessor mainProcessor = new WaitingTasksProcessor(createHiveDNSSetupProcessor(domName, templateVars));
|
||||||
mainProcessor.appendProcessor(hiveName, createHiveEMailSetupProcessor(em, domName), "Setup EMail");
|
mainProcessor.appendProcessor(hiveName, createHiveEMailSetupProcessor(em, domName), "Setup EMail");
|
||||||
String hiveInetAddr = pac.getHive().getInetAddr().getInetAddr();
|
String hiveInetAddr = pac.getHive().getInetAddr().getInetAddr();
|
||||||
for (String queueName : new String[] { "dns1", "dns2", "dns3" }) {
|
Config config = Config.getInstance();
|
||||||
|
for (String queueName : config.getProperty("queues.dns").split(",")) {
|
||||||
mainProcessor.appendProcessor(queueName, createDNSServerSetupProcessor(domName, hiveInetAddr), queueName + ".hostsharing.net");
|
mainProcessor.appendProcessor(queueName, createDNSServerSetupProcessor(domName, hiveInetAddr), queueName + ".hostsharing.net");
|
||||||
}
|
}
|
||||||
for (String queueName : new String[] { "mail1", "mail2", "mail3" }) {
|
for (String queueName : config.getProperty("queues.mail").split(",")) {
|
||||||
mainProcessor.appendProcessor(queueName, createMailinSetupProcessor(domName, pac), queueName + ".hostsharing.net");
|
mainProcessor.appendProcessor(queueName, createMailinSetupProcessor(domName, pac), queueName + ".hostsharing.net");
|
||||||
}
|
}
|
||||||
templateVars = new HashMap<String, String>();
|
templateVars = new HashMap<String, String>();
|
||||||
@ -83,10 +85,11 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
|
|||||||
createHiveDNSRemoveProcessor(domName)
|
createHiveDNSRemoveProcessor(domName)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
for (String queueName : new String[] { "dns1", "dns2", "dns3" }) {
|
Config config = Config.getInstance();
|
||||||
|
for (String queueName : config.getProperty("queues.dns").split(",")) {
|
||||||
mainProcessor.appendProcessor(queueName, createDNSServerRemoveProcessor(domName), queueName + ".hostsharing.net");
|
mainProcessor.appendProcessor(queueName, createDNSServerRemoveProcessor(domName), queueName + ".hostsharing.net");
|
||||||
}
|
}
|
||||||
for (String queueName : new String[] { "mail1", "mail2", "mail3" }) {
|
for (String queueName : config.getProperty("queues.mail").split(",")) {
|
||||||
mainProcessor.appendProcessor(queueName, createMailinDeleteProcessor(domName), queueName + ".hostsharing.net");
|
mainProcessor.appendProcessor(queueName, createMailinDeleteProcessor(domName), queueName + ".hostsharing.net");
|
||||||
}
|
}
|
||||||
mainProcessor.appendProcessor(dom.getHiveName(), createApacheVHostDeleteProcessor(dom), "remove apache vhost");
|
mainProcessor.appendProcessor(dom.getHiveName(), createApacheVHostDeleteProcessor(dom), "remove apache vhost");
|
||||||
|
@ -11,6 +11,7 @@ import de.hsadmin.core.qserv.EntityProcessorFactory;
|
|||||||
import de.hsadmin.core.qserv.Processor;
|
import de.hsadmin.core.qserv.Processor;
|
||||||
import de.hsadmin.core.qserv.ShellProcessor;
|
import de.hsadmin.core.qserv.ShellProcessor;
|
||||||
import de.hsadmin.core.qserv.WaitingTasksProcessor;
|
import de.hsadmin.core.qserv.WaitingTasksProcessor;
|
||||||
|
import de.hsadmin.core.util.Config;
|
||||||
|
|
||||||
public class EMailAddressProcessorFactory implements EntityProcessorFactory {
|
public class EMailAddressProcessorFactory implements EntityProcessorFactory {
|
||||||
|
|
||||||
@ -26,7 +27,8 @@ public class EMailAddressProcessorFactory implements EntityProcessorFactory {
|
|||||||
WaitingTasksProcessor waitingTasksProcessor = new WaitingTasksProcessor(cp);
|
WaitingTasksProcessor waitingTasksProcessor = new WaitingTasksProcessor(cp);
|
||||||
String pacName = email.getDomain().getUser().getPac().getName();
|
String pacName = email.getDomain().getUser().getPac().getName();
|
||||||
String domName = email.getDomain().getName();
|
String domName = email.getDomain().getName();
|
||||||
for (String queueName : new String[] { "mail1", "mail2", "mail3" }) {
|
Config config = Config.getInstance();
|
||||||
|
for (String queueName : config.getProperty("queues.mail").split(",")) {
|
||||||
waitingTasksProcessor.appendProcessor(queueName, createMailinSetupProcessor(domName, pacName), queueName + ".hostsharing.net");
|
waitingTasksProcessor.appendProcessor(queueName, createMailinSetupProcessor(domName, pacName), queueName + ".hostsharing.net");
|
||||||
}
|
}
|
||||||
return waitingTasksProcessor;
|
return waitingTasksProcessor;
|
||||||
@ -53,7 +55,8 @@ public class EMailAddressProcessorFactory implements EntityProcessorFactory {
|
|||||||
cp.appendProcessor(
|
cp.appendProcessor(
|
||||||
new ShellProcessor( "postmap -d '" + fullDomain + "' /etc/postfix/virtual" ) );
|
new ShellProcessor( "postmap -d '" + fullDomain + "' /etc/postfix/virtual" ) );
|
||||||
WaitingTasksProcessor waitingTasksProcessor = new WaitingTasksProcessor(cp);
|
WaitingTasksProcessor waitingTasksProcessor = new WaitingTasksProcessor(cp);
|
||||||
for (String queueName : new String[] { "mail1", "mail2", "mail3" }) {
|
Config config = Config.getInstance();
|
||||||
|
for (String queueName : config.getProperty("queues.mail").split(",")) {
|
||||||
waitingTasksProcessor.appendProcessor(queueName, createMailinDeleteProcessor(fullDomain), queueName + ".hostsharing.net");
|
waitingTasksProcessor.appendProcessor(queueName, createMailinDeleteProcessor(fullDomain), queueName + ".hostsharing.net");
|
||||||
}
|
}
|
||||||
return waitingTasksProcessor;
|
return waitingTasksProcessor;
|
||||||
|
Loading…
Reference in New Issue
Block a user