From 400c14a23e4e49f94de6f207d09d5c0633de6f76 Mon Sep 17 00:00:00 2001
From: Peter Hormanns
Date: Thu, 20 Sep 2012 17:21:04 +0200
Subject: [PATCH 1/5] merged
---
.../mods/dom/DomainProcessorFactory.java | 4 +-
.../hsadmin/mods/dom/httpd-vhost-dynamic.jtpl | 19 +++--
.../hsadmin/mods/dom/httpd-vhost-static.jtpl | 12 ++--
.../dom/postgrey-whitelist-recipients.jtpl | 8 ++-
.../hsadmin/mods/pac/PacProcessorFactory.java | 21 +++++-
.../mods/pac/email_new_pac_account.jtpl | 71 -------------------
hsarback/src/de/hsadmin/mods/pac/hosts.jtpl | 7 +-
.../de/hsadmin/mods/pac/httpd-virtual.jtpl | 28 ++++++++
.../src/de/hsadmin/mods/pac/interfaces.jtpl | 7 +-
.../src/de/hsadmin/mods/pac/proftpd-conf.jtpl | 9 ++-
hsarback/src/de/hsadmin/mods/pac/sudoers.jtpl | 8 ++-
11 files changed, 97 insertions(+), 97 deletions(-)
delete mode 100644 hsarback/src/de/hsadmin/mods/pac/email_new_pac_account.jtpl
create mode 100644 hsarback/src/de/hsadmin/mods/pac/httpd-virtual.jtpl
diff --git a/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java b/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
index ead2757..23dade5 100644
--- a/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
+++ b/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
@@ -311,10 +311,10 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
}
Processor domSetupProcessor = new CompoundProcessor(
createDomainDirectoriesProcessor(dom, templateVars),
- new CreateFileProcessor(selectVHostTemplate(dom), templateVars, "/etc/apache2/sites-available/" + domName + ".tmp", "root", "root", "644", true),
+ new CreateFileProcessor(selectVHostTemplate(dom), templateVars, iterateMaps.iterator(), "/etc/apache2/sites-available/" + domName + ".tmp", "root", "root", "644", true),
new ShellProcessor("ls /etc/apache2/pems/" + pac + ".pem >/dev/null 2>&1 " +
"&& sed -i '/SSLCertificate.*default/d' " + "/etc/apache2/sites-available/" + domName + ".tmp" +
- " && (ls /etc/apache2/pems/" + pac + ".chain.pem >/dev/null 2>&1 || sed -i '/SSLCertificateChain.*" + pac + "/d' " + "/etc/apache2/sites-available/" + domName + ")" +
+ " && (ls /etc/apache2/pems/" + pac + ".chain.pem >/dev/null 2>&1 || sed -i '/SSLCertificateChain.*" + pac + "/d' " + "/etc/apache2/sites-available/" + domName + ".tmp )" +
" || sed -i '/SSLCertificate.*" + pac + "/d' " + "/etc/apache2/sites-available/" + domName + ".tmp"),
new ShellProcessor(
" ( diff -q /etc/apache2/sites-available/" + domName + ".tmp /etc/apache2/sites-available/" + domName + " && rm /etc/apache2/sites-available/" + domName + ".tmp ) " +
diff --git a/hsarback/src/de/hsadmin/mods/dom/httpd-vhost-dynamic.jtpl b/hsarback/src/de/hsadmin/mods/dom/httpd-vhost-dynamic.jtpl
index 3598247..7ff5764 100644
--- a/hsarback/src/de/hsadmin/mods/dom/httpd-vhost-dynamic.jtpl
+++ b/hsarback/src/de/hsadmin/mods/dom/httpd-vhost-dynamic.jtpl
@@ -1,4 +1,9 @@
-
+#
+# This file is managed by HSAdmin.
+# Do not edit manually. Changes will be overwritten.
+#
+
+
ServerName {DOM_HOSTNAME}
ServerAlias *.{DOM_HOSTNAME}
@@ -37,8 +42,8 @@
RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:80)?$ [novary]
RewriteCond /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1} -d
RewriteRule ^(.*) /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1}$1 [last]
-
- RewriteCond %{REQUEST_URI} !^/cgi-bin/
+
+ RewriteCond %{REQUEST_URI} !^/cgi-bin/
RewriteCond %{REQUEST_URI} !^/fastcgi-bin/
RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:80)?$ [novary]
RewriteCond /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1} !-d
@@ -95,14 +100,14 @@
RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:443)?$ [novary]
RewriteCond /home/doms/{DOM_HOSTNAME}/subs-ssl/${tolower:%1} -d
RewriteRule ^(.*) /home/doms/{DOM_HOSTNAME}/subs-ssl/${tolower:%1}$1 [last]
-
- RewriteCond %{REQUEST_URI} !^/cgi-bin/
+
+ RewriteCond %{REQUEST_URI} !^/cgi-bin/
RewriteCond %{REQUEST_URI} !^/fastcgi-bin/
RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:443)?$ [novary]
RewriteCond /home/doms/{DOM_HOSTNAME}/subs-ssl/${tolower:%1} !-d
RewriteRule ^(.*) - [redirect=404,last]
-
- AddType application/x-httpd-php .php .php5 .php4 .php3
+
+ AddType application/x-httpd-php .php .php5 .php4 .php3
Action application/x-httpd-php /fastcgi-bin/phpstub
diff --git a/hsarback/src/de/hsadmin/mods/dom/httpd-vhost-static.jtpl b/hsarback/src/de/hsadmin/mods/dom/httpd-vhost-static.jtpl
index c6982a4..0f0cc6e 100644
--- a/hsarback/src/de/hsadmin/mods/dom/httpd-vhost-static.jtpl
+++ b/hsarback/src/de/hsadmin/mods/dom/httpd-vhost-static.jtpl
@@ -1,4 +1,9 @@
-
+#
+# This file is managed by HSAdmin.
+# Do not edit manually. Changes will be overwritten.
+#
+
+
ServerName {DOM_HOSTNAME}
ServerAlias *.{DOM_HOSTNAME}
@@ -30,7 +35,6 @@
RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:80)?$ [novary]
RewriteCond /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1} -d
RewriteRule ^(.*) /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1}$1 [last]
-
RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:80)?$ [novary]
RewriteCond /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1} !-d
RewriteRule ^(.*) - [redirect=404,last]
@@ -80,6 +84,6 @@
RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:443)?$ [novary]
RewriteCond /home/doms/{DOM_HOSTNAME}/subs-ssl/${tolower:%1} !-d
RewriteRule ^(.*) - [redirect=404,last]
-
-
+
+
\ No newline at end of file
diff --git a/hsarback/src/de/hsadmin/mods/dom/postgrey-whitelist-recipients.jtpl b/hsarback/src/de/hsadmin/mods/dom/postgrey-whitelist-recipients.jtpl
index e787e1c..d948b97 100644
--- a/hsarback/src/de/hsadmin/mods/dom/postgrey-whitelist-recipients.jtpl
+++ b/hsarback/src/de/hsadmin/mods/dom/postgrey-whitelist-recipients.jtpl
@@ -1,10 +1,12 @@
-### Do not edit this file manually
-### Generated by HSAdmin Queue Server
+#
+# This file is managed by HSAdmin.
+# Do not edit manually. Changes will be overwritten.
+#
abuse@
postmaster@
-################################################################################
+####################################################
{DOM}
diff --git a/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java b/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java
index 9ded029..f55b656 100644
--- a/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java
+++ b/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java
@@ -16,6 +16,7 @@ import de.hsadmin.core.qserv.Processor;
import de.hsadmin.core.qserv.ProcessorException;
import de.hsadmin.core.qserv.ShellProcessor;
import de.hsadmin.core.qserv.TemplateProcessor;
+import de.hsadmin.core.qserv.CreateFileProcessor;
import de.hsadmin.core.qserv.WaitingTasksProcessor;
import de.hsadmin.core.util.Config;
import de.hsadmin.core.util.PasswordTool;
@@ -44,12 +45,27 @@ public class PacProcessorFactory implements EntityProcessorFactory {
createSudouersProc(hiveValues, pacValuesList),
createProftpdConfProc(hiveValues, pacValuesList),
createMakePacDirectoryStructure(unixUser),
- createIfUp(pacName));
+ createIfUp(pacName),
+ createHttpdVirtualProc(pacName, pacValuesList));
WaitingTasksProcessor secProcessor = new WaitingTasksProcessor(priProcessor);
// secProcessor.appendProcessor(pac.getHiveName(), createSendEMailProc(pacName, customerEMail, emailVars), "send email to customer");
return secProcessor;
}
+ private Processor createHttpdVirtualProc(
+ String pacName, List
\ No newline at end of file
diff --git a/hsarback/src/de/hsadmin/mods/dom/index.html.jtpl b/hsarback/src/de/hsadmin/mods/dom/index.html.jtpl
index b55e909..08d1a9d 100644
--- a/hsarback/src/de/hsadmin/mods/dom/index.html.jtpl
+++ b/hsarback/src/de/hsadmin/mods/dom/index.html.jtpl
@@ -10,11 +10,11 @@
Diese neue Website wurde gerade bei der
Hostsharing eG
-für {USER_NAME} eingerichtet.
+für {USER_NAME} eingerichtet.
Der Inhaber der Domain ist bereits per Email unter
webmaster(at){DOMAIN}
-zu erreichen.
+zu erreichen.