From 2d2c320454a15efe84c253cb91c334c497ec1f1d Mon Sep 17 00:00:00 2001
From: Peter Hormanns <peter.hormanns@jalin.de>
Date: Fri, 04 Oct 2019 19:42:40 +0200
Subject: [PATCH] do salt-call

---
 hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java |    6 ++++++
 hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm         |    6 +++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java b/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java
index 34ee58b..06aea19 100644
--- a/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java
+++ b/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java
@@ -52,6 +52,7 @@
 				createMakePacDirectoryStructure(unixUser),
 				createIfUp(pac),
 				createHttpdVirtualProc(hive),
+				createSaltCallProc(),
 				createAccountingRulesProc()));
 			final Config config = Config.getInstance();
 			for (String queueName : config.getProperty("queues.dns").split(",")) {
@@ -75,6 +76,7 @@
 				createNetworkInterfacesProc(hive),
 				createProftpdConfProc(hive),
 		        createHttpdVirtualProc(hive),
+				createSaltCallProc(),
 				createSetQuotaProc(pac)
 				));
 			final Config config = Config.getInstance();
@@ -153,6 +155,10 @@
 		return new ShellProcessor("mk-iptables-rules Accounting");
 	}
 
+	private Processor createSaltCallProc() {
+		return new ShellProcessor("salt-call state.sls pacs && invoke-rc.d apache2 reload >/dev/null 2>&1");
+	}
+	
 	private Processor createZonefileProc(final EntityManager em, final Pac pac) {
 		final Map<String, Object> zonefileTemplateVars = new HashMap<String, Object>();
 		zonefileTemplateVars.put("sio", Long.toString(System.currentTimeMillis()/1000L));
diff --git a/hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm b/hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm
index 7613365..1460a38 100644
--- a/hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm
+++ b/hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm
@@ -20,9 +20,9 @@
     ServerAdmin webmaster@${pac.name}.hostsharing.net
 
     SSLEngine On
-    SSLCertificateFile /etc/apache2/pems-enabled/${pac.name}.hostsharing.net.crt
-    SSLCertificateKeyFile /etc/apache2/pems-enabled/${pac.name}.hostsharing.net.key
-    SSLCertificateChainFile /etc/apache2/pems-enabled/${pac.name}.hostsharing.net.chain
+    SSLCertificateFile /etc/apache2/pems-custom/_.hostsharing.net.crt
+    SSLCertificateKeyFile /etc/apache2/pems-custom/_.hostsharing.net.key
+    SSLCertificateChainFile /etc/apache2/pems-custom/_.hostsharing.net.chain
 
     <Directory />
         SSLRequireSSL On

--
Gitblit v1.9.0-SNAPSHOT