HSAdmin Backend Domains, E-Mail, Datenbanken
Michael Hierweck
2019-03-05 c09e9bba2e193126b4a65771722ad99ce4a0225f
merge IPv6 changes
6 files modified
1 files added
56 ■■■■■ changed files
hsarback/src/de/hsadmin/mods/dom/apache-vhost.vm 8 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/zonefile.vm 2 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java 24 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/pac/hosts.vm 3 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm 4 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/pac/pac-addr-ipv6.vm 8 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/pac/proftpd-pacs-conf.vm 7 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/apache-vhost.vm
@@ -3,7 +3,7 @@
# Do not edit manually. Changes will be overwritten.
#
<VirtualHost ${pac.curINetAddr.inetAddr}:80 ${pac.oldINetAddr.inetAddr}:80>
<VirtualHost ${pac.curINetAddr.inetAddr}:80 ${pac.oldINetAddr.inetAddr}:80 ${pac.curINet6Addr.inetAddr}:80 ${pac.oldINet6Addr.inetAddr}: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.inetAddr}:443 ${pac.oldINetAddr.inetAddr}:443>
<VirtualHost ${pac.curINetAddr.inetAddr}:443 ${pac.oldINetAddr.inetAddr}:443 ${pac.curINet6Addr.inetAddr}:443 ${pac.oldINet6Addr.inetAddr}:443>
    ServerName ${dom.name}
    ServerAlias ${dom.serveraliases}
    ServerAdmin webmaster@${dom.name}
@@ -124,6 +124,10 @@
        Options +ExecCGI +IncludesNoExec -Indexes -MultiViews +SymLinksIfOwnerMatch
    </Location>
    
#if( ${phplatest} )
    FcgidInitialEnv HTTP_PHP_BIN /usr/lib/cgi-bin/php7.3
#end
    RewriteEngine On
    RewriteOptions Inherit
    
hsarback/src/de/hsadmin/mods/dom/zonefile.vm
@@ -16,9 +16,11 @@
${dom.name}.            IN        MX    30 mailin3.hostsharing.net.
${dom.name}.            IN        A    ${pac.curINetAddr.inetAddr}
;${dom.name}.      IN    AAAA ${pac.curINet6Addr.inetAddr}
*.${dom.name}.               IN        MX    30 mailin1.hostsharing.net.
*.${dom.name}.            IN        MX    30 mailin2.hostsharing.net.
*.${dom.name}.            IN        MX    30 mailin3.hostsharing.net.
*.${dom.name}.            IN        A   ${pac.curINetAddr.inetAddr}
;*.${dom.name}.    IN    AAAA ${pac.curINet6Addr.inetAddr}
hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java
@@ -176,21 +176,29 @@
    }
    private Processor createIfUp(final Pac pac) {
//        return new ShellProcessor("ifup eth0:" + pacName);
        return new ShellProcessor("ip addr add "
        return new CompoundProcessor(new ShellProcessor("ip addr add "
                + pac.getCurINetAddr().getInetAddr()
                + "/32 dev eth0 label eth0:"
                + "/32 dev eth0"
                + pac.getName()
            );
            ),
        new ShellProcessor("ip addr add "
        + pac.getCurINet6Addr().getInetAddr()
        + "/128 dev eth0 noprefixroute preferred_lft 0"
        + pac.getName()
      ));
    }
    private Processor createIfDown(final Pac pac) {
//        return new ShellProcessor("ifdown eth0:" + pacName);
        return new ShellProcessor("ip addr del "
        return new CompoundProcessor(new ShellProcessor("ip addr del "
                + pac.getCurINetAddr().getInetAddr()
                + "/32 dev eth0 label eth0:"
                + "/32 dev eth0"
                + pac.getName()
            );
            ),
        new ShellProcessor("ip addr add "
        + pac.getCurINet6Addr().getInetAddr()
        + "/128 dev eth0 noprefixroute preferred_lft 0"
        + pac.getName()
      ));
    }
    private UnixUser getPacAdminUser(Pac pac) throws ProcessorException {
hsarback/src/de/hsadmin/mods/pac/hosts.vm
@@ -4,7 +4,6 @@
#
127.0.0.1       localhost
::1             ip6-localhost ip6-loopback
fe00::0         ip6-localnet
ff00::0         ip6-mcastprefix
@@ -13,7 +12,9 @@
ff02::3         ip6-allhosts
${hive.inetAddr.inetAddr}    ${hive.name}.hostsharing.net    ${hive.name}    localhive
${hive.inet6Addr.inetAddr} ${hive.name}.hostsharing.net ${hive.name} localhive
#foreach( $pac in ${hive.webpacs} )
${pac.curINetAddr.inetAddr}        ${pac.name}.hostsharing.net        ${pac.name}
${pac.curINet6Addr.inetAddr} ${pac.name}.hostsharing.net ${pac.name}
#end
hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm
@@ -4,7 +4,7 @@
#
#foreach( $pac in ${hive.webpacs} )
<VirtualHost ${pac.curINetAddr.inetAddr}:80>
<VirtualHost ${pac.curINetAddr.inetAddr}:80 ${pac.curINet6Addr.inetAddr}:80>
    ServerName _
    ServerAdmin webmaster@${pac.name}.hostsharing.net
@@ -15,7 +15,7 @@
</VirtualHost>
<VirtualHost ${pac.curINetAddr.inetAddr}:443>
<VirtualHost ${pac.curINetAddr.inetAddr}:443 ${pac.curINet6Addr.inetAddr}:443>
    ServerName _
    ServerAdmin webmaster@${pac.name}.hostsharing.net
hsarback/src/de/hsadmin/mods/pac/pac-addr-ipv6.vm
New file
@@ -0,0 +1,8 @@
#
# This file is managed by HSAdmin.
# Do not edit manually. Changes will be overwritten.
#
#
#foreach( $pac in ${hive.webpacs} )
eth0:${pac.name}:${pac.curINet6Addr.inetAddr}/128
#end
hsarback/src/de/hsadmin/mods/pac/proftpd-pacs-conf.vm
@@ -4,18 +4,16 @@
#
#foreach( $pac in ${hive.webpacs} )
<VirtualHost ${pac.curINetAddr.inetAddr}>
<VirtualHost ${pac.curINetAddr.inetAddr} ${pac.curINet6Addr.inetAddr}>
        DefaultRoot             ~ ${pac.name}
        ServerName              "${pac.name}.hostsharing.net"
        AllowOverwrite          on
        AllowForeignAddress     on
        <Limit LOGIN>
                Order           allow,deny
                AllowGroup      ${pac.name}
                DenyAll
        </Limit>
        <Anonymous /home/pacs/${pac.name}/ftp>
                User            ${pac.name}
                Group           ${pac.name}
@@ -25,13 +23,10 @@
                DirFakeGroup    on ftp
                DirFakeMode     000
                AuthAliasOnly   on
                <Limit WRITE>
                        DenyAll
                </Limit>
        </Anonymous>
</VirtualHost>
#end