HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2017-06-29 5a7dfa87b608366cd03b86c63af32f35ce1089b1
interate only webpacs in templates
6 files modified
28 ■■■■■ changed files
hsarback/src/de/hsadmin/mods/pac/Hive.java 12 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/pac/hosts.vm 2 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm 6 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/pac/pac-addr-ipv4.vm 4 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/pac/proftpd-pacs-conf.vm 2 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/pac/sudoers-pacs.vm 2 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/pac/Hive.java
@@ -6,6 +6,8 @@
import static javax.persistence.GenerationType.SEQUENCE;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import javax.persistence.Column;
@@ -117,6 +119,16 @@
    public Set<Pac> getPacs() {
        return pacs;
    }
    public List<Pac> getWebpacs() {
        final ArrayList<Pac> webpacs = new ArrayList<Pac>();
        for (final Pac pac : pacs) {
            if (!pac.isManagedServer()) {
                webpacs.add(pac);
            }
        }
        return webpacs;
    }
    public void setPacs(Set<Pac> pacs) {
        this.pacs = pacs;
hsarback/src/de/hsadmin/mods/pac/hosts.vm
@@ -14,6 +14,6 @@
${hive.inetAddr.inetAddr}    ${hive.name}.hostsharing.net    ${hive.name}    localhive
#foreach( $pac in ${hive.pacs} )
#foreach( $pac in ${hive.webpacs} )
${pac.curINetAddr.inetAddr}        ${pac.name}.hostsharing.net        ${pac.name}
#end
hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm
@@ -3,10 +3,10 @@
# Do not edit manually. Changes will be overwritten.
#
#foreach( $pac in ${hive.pacs} )
#foreach( $pac in ${hive.webpacs} )
<VirtualHost ${pac.curINetAddr.inetAddr}:80>
    ServerName _
    ServerAdmin webmaster@${pac.getName}
    ServerAdmin webmaster@${pac.getName}.hostsharing.net
    <Directory />
        Redirect 404 /
@@ -16,7 +16,7 @@
<VirtualHost ${pac.curINetAddr.inetAddr}:443>
    ServerName _
    ServerAdmin webmaster@${pac.getName}
    ServerAdmin webmaster@${pac.getName}.hostsharing.net
    SSLEngine On
    SSLCertificateFile /etc/apache2/pems-enabled/${pac.getName}.crt
hsarback/src/de/hsadmin/mods/pac/pac-addr-ipv4.vm
@@ -3,8 +3,6 @@
# Do not edit manually. Changes will be overwritten.
#
#
#foreach( $pac in ${hive.pacs} )
#if( !${pac.managedServer} )
#foreach( $pac in ${hive.webpacs} )
eth0:${pac.name}:${pac.curINetAddr.inetAddr}/32
#end
#end
hsarback/src/de/hsadmin/mods/pac/proftpd-pacs-conf.vm
@@ -3,7 +3,7 @@
# Do not edit manually. Changes will be overwritten.
#
#foreach( $pac in ${hive.pacs} )
#foreach( $pac in ${hive.webpacs} )
<VirtualHost ${pac.curINetAddr.inetAddr}>
        DefaultRoot             ~ ${pac.name}
        ServerName              "${pac.name}.hostsharing.net"
hsarback/src/de/hsadmin/mods/pac/sudoers-pacs.vm
@@ -3,6 +3,6 @@
# Do not edit manually. Changes will be overwritten.
#
#foreach( $pac in ${hive.pacs} )
#foreach( $pac in ${hive.webpacs} )
${pac.name} ALL = (%${pac.name}) NOPASSWD: ALL
#end