From b0fca568ac94998fea36945743e5bd4a0cdc4b5f Mon Sep 17 00:00:00 2001
From: Peter Hormanns <peter.hormanns@jalin.de>
Date: Wed, 27 Mar 2019 13:41:54 +0100
Subject: [PATCH] ipv6 in square brackets

---
 hsarback/src/de/hsadmin/mods/dom/apache-vhost.vm  |    4 ++--
 hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm |    4 ++--
 hsarback/src/de/hsadmin/mods/pac/pac-zonefile.vm  |   15 +++++++++++++++
 3 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/hsarback/src/de/hsadmin/mods/dom/apache-vhost.vm b/hsarback/src/de/hsadmin/mods/dom/apache-vhost.vm
index 7834096..15f42f5 100644
--- a/hsarback/src/de/hsadmin/mods/dom/apache-vhost.vm
+++ b/hsarback/src/de/hsadmin/mods/dom/apache-vhost.vm
@@ -3,7 +3,7 @@
 # Do not edit manually. Changes will be overwritten.
 #
 
-<VirtualHost ${pac.curINetAddr.inet4Addr}:80 ${pac.oldINetAddr.inet4Addr}:80 ${pac.curINetAddr.inet6Addr}:80 ${pac.oldINetAddr.inet6Addr}:80>
+<VirtualHost ${pac.curINetAddr.inet4Addr}:80 ${pac.oldINetAddr.inet4Addr}:80 [${pac.curINetAddr.inet6Addr}]:80 [${pac.oldINetAddr.inet6Addr}]:80>
     ServerName ${dom.name}
     ServerAlias ${dom.serveraliases}
     ServerAdmin webmaster@${dom.name}
@@ -76,7 +76,7 @@
     Action application/x-httpd-php /fastcgi-bin/phpstub
 </VirtualHost>
 
-<VirtualHost ${pac.curINetAddr.inet4Addr}:443 ${pac.oldINetAddr.inet4Addr}:443 ${pac.curINetAddr.inet6Addr}:443 ${pac.oldINetAddr.inet6Addr}:443>
+<VirtualHost ${pac.curINetAddr.inet4Addr}:443 ${pac.oldINetAddr.inet4Addr}:443 [${pac.curINetAddr.inet6Addr}]:443 [${pac.oldINetAddr.inet6Addr}]:443>
     ServerName ${dom.name}
     ServerAlias ${dom.serveraliases}
     ServerAdmin webmaster@${dom.name}
diff --git a/hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm b/hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm
index 13b9922..7613365 100644
--- a/hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm
+++ b/hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm
@@ -4,7 +4,7 @@
 #
 
 #foreach( $pac in ${hive.webpacs} )
-<VirtualHost ${pac.curINetAddr.inet4Addr}:80 ${pac.curINetAddr.inet6Addr}:80>
+<VirtualHost ${pac.curINetAddr.inet4Addr}:80 [${pac.curINetAddr.inet6Addr}]:80>
     ServerName _
     ServerAdmin webmaster@${pac.name}.hostsharing.net
 
@@ -15,7 +15,7 @@
 
 </VirtualHost>
 
-<VirtualHost ${pac.curINetAddr.inet4Addr}:443 ${pac.curINetAddr.inet6Addr}:443>
+<VirtualHost ${pac.curINetAddr.inet4Addr}:443 [${pac.curINetAddr.inet6Addr}]:443>
     ServerName _
     ServerAdmin webmaster@${pac.name}.hostsharing.net
 
diff --git a/hsarback/src/de/hsadmin/mods/pac/pac-zonefile.vm b/hsarback/src/de/hsadmin/mods/pac/pac-zonefile.vm
new file mode 100644
index 0000000..87dbdd8
--- /dev/null
+++ b/hsarback/src/de/hsadmin/mods/pac/pac-zonefile.vm
@@ -0,0 +1,15 @@
+$TTL 6H
+${pac.name}.hostsharing.net. IN SOA ${hive}.hostsharing.net. hostmaster.hostsharing.net. (
+        ${sio}  ; serial secs since Jan 1 1970
+        6H    ; refresh (>=10000)
+        1H    ; retry (>=1800)
+        1W    ; expire
+        1H    ; minimum
+)
+
+${pac.name}.hostsharing.net.      IN    NS  dns1.hostsharing.net.
+${pac.name}.hostsharing.net.      IN    NS  dns2.hostsharing.net.
+${pac.name}.hostsharing.net.      IN    NS  dns3.hostsharing.net.
+
+${pac.name}.hostsharing.net.      IN    A    ${pac.curINetAddr.inet4Addr}
+${pac.name}.hostsharing.net.      IN    AAAA ${pac.curINetAddr.inet6Addr}

--
Gitblit v1.9.0-SNAPSHOT