1 files deleted
1 files added
9 files modified
| | |
| | | } |
| | | 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 ) " + |
| | |
| | | <!-- BEGIN: main --><VirtualHost {DOM_IPNUMBER}:80 {DOM_IPNUMBEREX}:80> |
| | | <!-- BEGIN: main --># |
| | | # This file is managed by HSAdmin. |
| | | # Do not edit manually. Changes will be overwritten. |
| | | # |
| | | |
| | | <VirtualHost {DOM_IPNUMBER}:80 {DOM_IPNUMBEREX}:80> |
| | | |
| | | ServerName {DOM_HOSTNAME} |
| | | ServerAlias *.{DOM_HOSTNAME} |
| | |
| | | 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] |
| | | |
| | | <!-- BEGIN: iterate --> RewriteCond %{REQUEST_URI} !^/cgi-bin/ |
| | | <!-- BEGIN: iterate --> |
| | | 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 |
| | |
| | | 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] |
| | | |
| | | <!-- BEGIN: nosubdomainfallbackforhttps --> RewriteCond %{REQUEST_URI} !^/cgi-bin/ |
| | | <!-- BEGIN: nosubdomainfallbackforhttps --> |
| | | 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] |
| | | |
| | | <!-- END: nosubdomainfallbackforhttps --> AddType application/x-httpd-php .php .php5 .php4 .php3 |
| | | <!-- END: nosubdomainfallbackforhttps --> |
| | | AddType application/x-httpd-php .php .php5 .php4 .php3 |
| | | Action application/x-httpd-php /fastcgi-bin/phpstub |
| | | |
| | | </VirtualHost> |
| | |
| | | <!-- BEGIN: main --><VirtualHost {DOM_IPNUMBER}:80 {DOM_IPNUMBEREX}:80> |
| | | <!-- BEGIN: main --># |
| | | # This file is managed by HSAdmin. |
| | | # Do not edit manually. Changes will be overwritten. |
| | | # |
| | | |
| | | <VirtualHost {DOM_IPNUMBER}:80 {DOM_IPNUMBEREX}:80> |
| | | |
| | | ServerName {DOM_HOSTNAME} |
| | | ServerAlias *.{DOM_HOSTNAME} |
| | |
| | | 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] |
| | | |
| | | <!-- BEGIN: iterate --> RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:80)?$ [novary] |
| | | RewriteCond /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1} !-d |
| | | RewriteRule ^(.*) - [redirect=404,last] |
| | |
| | | <!-- BEGIN: nosubdomainfallbackforhttps --> RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:443)?$ [novary] |
| | | RewriteCond /home/doms/{DOM_HOSTNAME}/subs-ssl/${tolower:%1} !-d |
| | | RewriteRule ^(.*) - [redirect=404,last] |
| | | |
| | | <!-- END: nosubdomainfallbackforhttps --></VirtualHost> |
| | | <!-- END: nosubdomainfallbackforhttps --> |
| | | </VirtualHost> |
| | | <!-- END: main --> |
| | |
| | | <!-- BEGIN: main -->### Do not edit this file manually |
| | | ### Generated by HSAdmin Queue Server |
| | | <!-- BEGIN: main --># |
| | | # This file is managed by HSAdmin. |
| | | # Do not edit manually. Changes will be overwritten. |
| | | # |
| | | |
| | | abuse@ |
| | | postmaster@ |
| | | |
| | | ################################################################################ |
| | | #################################################### |
| | | |
| | | <!-- BEGIN: iterate -->{DOM} |
| | | <!-- END: iterate --> |
| | |
| | | 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; |
| | |
| | | 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<Map<String, String>> pacValuesList) throws ProcessorException { |
| | | Processor domSetupProcessor = new CompoundProcessor( |
| | | new CreateFileProcessor("/de/hsadmin/mods/pac/httpd-virtual.jtpl", new HashMap<String, String>(), pacValuesList.iterator(), "/etc/apache2/virtual.conf.tmp", "root", "root", "644", true), |
| | | new ShellProcessor("ls /etc/apache2/pems/" + pacName + ".pem >/dev/null 2>&1 " + "&& sed -i '/SSLCertificate.*default/d' " + "/etc/apache2/apache.conf.tmp" |
| | | + " && (ls /etc/apache2/pems/" + pacName + ".chain.pem >/dev/null 2>&1" |
| | | + " || sed -i '/SSLCertificateChain.*" + pacName + "/d' " + "/etc/apache2/virtual.conf.tmp)" |
| | | + " || sed -i '/SSLCertificate.*" + pacName + "/d' " + "/etc/apache2/virtual.conf.tmp"), |
| | | new ShellProcessor("(diff -q /etc/apache2/apache.conf.tmp /etc/apache2/apache.conf" |
| | | + " && rm /etc/apache2/apache.conf.tmp)" |
| | | + " || invoke-rc.d apache2 reload >/dev/null 2>&1")); |
| | | return domSetupProcessor; |
| | | } |
| | | |
| | | @Override |
| | |
| | | createEtcHostsProc(hiveValues, pacValuesList), |
| | | createNetworkInterfacesProc(hiveValues, pacValuesList), |
| | | createSudouersProc(hiveValues, pacValuesList), |
| | | createProftpdConfProc(hiveValues, pacValuesList))); |
| | | createProftpdConfProc(hiveValues, pacValuesList), |
| | | createHttpdVirtualProc(pac.getName(), pacValuesList))); |
| | | waitingProcessor.appendProcessor(pac.getHiveName(), createDelUserProc(pac.getName()), "remove packet"); |
| | | return waitingProcessor; |
| | | } |
| | |
| | | <!-- BEGIN: main -->127.0.0.1 localhost |
| | | <!-- BEGIN: main --># |
| | | # This file is managed by HSAdmin. |
| | | # Do not edit manually. Changes will be overwritten. |
| | | # |
| | | |
| | | 127.0.0.1 localhost |
| | | |
| | | ::1 ip6-localhost ip6-loopback |
| | | fe00::0 ip6-localnet |
New file |
| | |
| | | <!-- BEGIN: main --># |
| | | # This file is managed by HSAdmin. |
| | | # Do not edit manually. Changes will be overwritten. |
| | | # |
| | | |
| | | <!-- BEGIN: iterate --> |
| | | NameVirtualHost {PAC_IP}:80 |
| | | NameVirtualHost {PAC_IP}:443 |
| | | |
| | | <VirtualHost {PAC_IP}:80> |
| | | |
| | | Redirect 404 / |
| | | |
| | | </VirtualHost> |
| | | |
| | | <VirtualHost {PAC_IP}:443> |
| | | |
| | | SSLEngine On |
| | | SSLCertificateFile /etc/apache2/pems/default.pem |
| | | SSLCertificateChainFile /etc/apache2/pems/default.chain.pem |
| | | SSLCertificateFile /etc/apache2/pems/{PAC}.pem |
| | | SSLCertificateChainFile /etc/apache2/pems/{PAC}.chain.pem |
| | | |
| | | Redirect 404 / |
| | | |
| | | </VirtualHost> |
| | | <!-- END: iterate --> |
| | | <!-- END: main --> |
| | |
| | | <!-- BEGIN: main -->auto lo |
| | | <!-- BEGIN: main --># |
| | | # This file is managed by HSAdmin. |
| | | # Do not edit manually. Changes will be overwritten. |
| | | # |
| | | |
| | | auto lo |
| | | iface lo inet loopback |
| | | |
| | | auto eth0 |
| | |
| | | <!-- BEGIN: main --># This proftpd config file is generated by hsadmin. |
| | | <!-- BEGIN: main --># |
| | | # This file is managed by HSAdmin. |
| | | # Do not edit manually. Changes will be overwritten. |
| | | # |
| | | |
| | | Include /etc/proftpd/modules.conf |
| | | |
| | |
| | | </Directory> |
| | | |
| | | <!-- BEGIN: iterate --> |
| | | #---------------------------------------------------------------------- |
| | | # {PAC}.hostsharing.net |
| | | #################################################### |
| | | |
| | | <VirtualHost {PAC_IP}> |
| | | DefaultRoot ~ {PAC} |
| | | ServerName "Hostsharing eG" |
| | |
| | | <!-- BEGIN: main -->### Do not edit this file manually |
| | | ### Generated by HSAdmin Queue Server |
| | | <!-- BEGIN: main --># |
| | | # This file is managed by HSAdmin. |
| | | # Do not edit manually. Changes will be overwritten. |
| | | # |
| | | |
| | | # Host alias specification |
| | | |
| | |
| | | root ALL=(ALL) ALL |
| | | %adm ALL=NOPASSWD: ALL |
| | | |
| | | ################################################################################ |
| | | #################################################### |
| | | |
| | | <!-- BEGIN: iterate -->{PAC} ALL = (%{PAC}) NOPASSWD: ALL |
| | | <!-- END: iterate --> |