HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2019-10-14 4c5e8bb7c330be3f96403d1a0ae670d9f69c7117
enable pac domain in apache sites
1 files modified
15 ■■■■■ changed files
hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java 15 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java
@@ -53,6 +53,7 @@
                createIfUp(pac),
                createHttpdVirtualProc(hive),
                createSaltCallProc(),
                createLinkSiteProc(pac.getName() + ".hostsharing.net"),
                createAccountingRulesProc()));
            final Config config = Config.getInstance();
            for (String queueName : config.getProperty("queues.dns").split(",")) {
@@ -77,6 +78,7 @@
                createProftpdConfProc(hive),
                createHttpdVirtualProc(hive),
                createSaltCallProc(),
                createUnlinkSiteProc(pac.getName() + ".hostsharing.net"),
                createSetQuotaProc(pac)
                ));
            final Config config = Config.getInstance();
@@ -156,7 +158,18 @@
    }
    private Processor createSaltCallProc() {
        return new ShellProcessor("salt-call state.sls pacs && invoke-rc.d apache2 reload >/dev/null 2>&1");
        return new ShellProcessor("salt-call state.sls pacs >/dev/null 2>&1");
    }
    private Processor createLinkSiteProc(final String pacDomain) {
        return new ShellProcessor("ln -sf /etc/apache2/sites-available/" + pacDomain + " /etc/apache2/sites-enabled/97-" + pacDomain
                + " && invoke-rc.d apache2 reload >/dev/null 2>&1");
    }
    private Processor createUnlinkSiteProc(final String pacDomain) {
        return new ShellProcessor("rm -f /etc/apache2/sites-enabled/97-" + pacDomain
                + " && rm -f /etc/apache2/sites-available/" + pacDomain + ""
                + " && invoke-rc.d apache2 reload >/dev/null 2>&1");
    }
    
    private Processor createZonefileProc(final EntityManager em, final Pac pac) {