remove old code

This commit is contained in:
Peter Hormanns 2020-06-08 15:34:09 +02:00
parent 4b5fdd06ef
commit ad193bd365

View File

@ -46,7 +46,6 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
}
mainProcessor.appendProcessor(hiveName, createDomainDirectoriesProcessor(dom), "Setup Domain Directories");
mainProcessor.appendProcessor(hiveName, createApacheVHostSetupProcessor(em, dom), "Setup Apache VHost");
// mainProcessor.appendProcessor(hiveName, createACMEBotProcessor(em, dom), "Setup ACMEBot");
mainProcessor.appendProcessor(hiveName, createTriggerAcmebotProcessor(em, dom), "Trigger ACMEBot");
return mainProcessor;
}
@ -56,11 +55,9 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
final UnixUser domUser = dom.getUser();
final Pac pac = domUser.getPac();
final Processor apacheVHostSetupProcessor = createApacheVHostSetupProcessor(em, dom);
// final Processor letencryptSetupProcessor = createACMEBotProcessor(em, dom);
final Processor triggerAcmebotProcessor = createTriggerAcmebotProcessor(em, dom);
final WaitingTasksProcessor processor = new WaitingTasksProcessor(
new CompoundProcessor(new ShellProcessor("salt-call state.sls pacs"), apacheVHostSetupProcessor, triggerAcmebotProcessor));
// new CompoundProcessor(new ShellProcessor("salt-call state.sls pacs"), apacheVHostSetupProcessor, letencryptSetupProcessor, triggerAcmebotProcessor));
final Config config = Config.getInstance();
for (String queueName : config.getProperty("queues.mail").split(",")) {
processor.appendProcessor(queueName, createMailinSetupProcessor(em, dom, pac), queueName + ".hostsharing.net");
@ -73,7 +70,6 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
final String domName = dom.getName();
final WaitingTasksProcessor mainProcessor = new WaitingTasksProcessor(
new NullProcessor()
// createACMEBotProcessor(em, dom)
);
final Config config = Config.getInstance();
for (String queueName : config.getProperty("queues.mail").split(",")) {
@ -350,23 +346,8 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
} else {
return new ShellProcessor(
"sudo -u acmebot /usr/local/sbin/hs-lego-wrapper " + domName);
// " && ln -s /etc/apache2/pems-generated/" + domName + ".key /etc/apache2/pems-enabled/" + domName + ".key" +
// " && ln -s /etc/apache2/pems-generated/" + domName + ".crt /etc/apache2/pems-enabled/" + domName + ".crt" +
// " && ln -s /etc/apache2/pems-generated/" + domName + ".chain /etc/apache2/pems-enabled/" + domName + ".chain" +
}
}
// private Processor createACMEBotProcessor(final EntityManager em, final Domain dom) throws ProcessorException {
// final Query query = em.createQuery("SELECT d FROM Domains d WHERE d.domainoptions.name = :option AND d.user.pac.hive.name = :hivename");
// final String hiveName = dom.getHiveName();
// final Map<String, Object> templateVars = new HashMap<String, Object>();
// query.setParameter("hivename", hiveName);
// query.setParameter("option", "letsencrypt");
// templateVars.put("domains", query.getResultList());
// return new CompoundProcessor(
// new CreateFileProcessor("/de/hsadmin/mods/dom/acmebot-domain.properties.vm", templateVars, dom,
// "/etc/hostsharing/acmebot/domain.properties.tmp", "acmebot", "acmebot", "640", true),
// new ShellProcessor("mv /etc/hostsharing/acmebot/domain.properties.tmp /etc/hostsharing/acmebot/domain.properties"));
// }
}