From abd74a422fb5e42032139fb71698eaba1dcf7701 Mon Sep 17 00:00:00 2001 From: Michael Hierweck Date: Tue, 30 Oct 2012 13:56:40 +0100 Subject: [PATCH] Removed: Content migration (packet subdomain) --- .../mods/dom/DomainProcessorFactory.java | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java b/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java index 2cb54a1..fab7eac 100644 --- a/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java +++ b/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java @@ -72,9 +72,6 @@ public class DomainProcessorFactory implements EntityProcessorFactory { templateVars.put("DOMAIN", domName); templateVars.put("USER_NAME", domUser.getComment()); mainProcessor.appendProcessor(hiveName, createApacheVHostSetupProcessor(em, dom, templateVars), "Setup Apache VHost"); - if (dom.isPacDomain()) { - mainProcessor.appendProcessor(hiveName, createMovePacDomainContent(em, dom), "Move pac domain content"); - } return mainProcessor; } @@ -372,43 +369,6 @@ public class DomainProcessorFactory implements EntityProcessorFactory { return vhostDelProcessor; } - private Processor createMovePacDomainContent(EntityManager em, Domain dom) { - Pac pac = dom.getUser().getPac(); - String pacName = pac.getName(); - String pacDir = "/home/pacs/" + pacName; - String domDir = pacDir + "/doms/" + pacName + ".hostsharing.net"; - String[] sourceDirs = new String[] { "web", "web-ssl", "cgi", "cgi-ssl", "fastcgi", "fastcgi-ssl" } ; - String[] targetDirs = new String[] { "htdocs", "htdocs-ssl", "cgi", "cgi-ssl", "fastcgi", "fastcgi-ssl" } ; - CompoundProcessor processor = new CompoundProcessor(); - for (int idx = 0; idx < targetDirs.length; idx++) { - processor.appendProcessor( - new ShellProcessor("rm -rf " + domDir + "/" + targetDirs[idx])); - } - for (int idx = 0; idx < sourceDirs.length; idx++) { - processor.appendProcessor( - new ShellProcessor("shopt -s dotglob && ls " + pacDir + "/" + sourceDirs[idx] + " >/dev/null 2>&1" + - " && mv " + pacDir + "/" + sourceDirs[idx] + " " + domDir + "/" + targetDirs[idx] + - " || echo 'directory " + pacDir + "/" + sourceDirs[idx] + " not found'")); - } - processor.appendProcessor( - new ShellProcessor("test -L " + domDir + "/htdocs" + - " && test $( stat -c '%N' " + domDir + "/htdocs |sed -e\"s/[\\`']//g\" |cut -d ' ' -f 3 ) = web-ssl " + - " && cd " + domDir + - " && rm " + domDir + "/htdocs" + - " && ln -sf htdocs-ssl htdocs" + - " && chown -h " + pacName + ":" + pacName + " " + domDir + "/htdocs" + - " || echo 'link htdocs not found'")); - processor.appendProcessor( - new ShellProcessor("test -L " + domDir + "/htdocs-ssl" + - " && test $( stat -c '%N' " + domDir + "/htdocs-ssl |sed -e\"s/[\\`']//g\" |cut -d ' ' -f 3 ) = web " + - " && cd " + domDir + - " && rm " + domDir + "/htdocs-ssl" + - " && ln -sf htdocs htdocs-ssl" + - " && chown -h " + pacName + ":" + pacName + " " + domDir + "/htdocs-ssl" + - " || echo 'link htdocs-ssl not found'")); - return processor; - } - private String selectVHostTemplate(Domain dom) { String domName = dom.getName(); UnixUser user = dom.getUser();