HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2011-12-19 5646148b7ef642f2db66047dc855cc55e5580990
make default gw configurable
2 files modified
11 ■■■■ changed files
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java 4 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java 7 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
@@ -252,7 +252,9 @@
        Processor domSetupProcessor = new CompoundProcessor(
            createDomainDirectoriesProcessor(dom, templateVars),
            new CreateFileProcessor(selectVHostTemplate(dom), templateVars, "/etc/apache2/sites-generated/" + domName, "root", "root", "644"),
            new ShellProcessor("ln -sf /etc/apache2/sites-generated/" + domName + " /etc/apache2/sites-enabled/010-" + domName + " && invoke-rc.d apache2 reload >/dev/null 2>&1")
            new ShellProcessor(
                    "ln -sf /etc/apache2/sites-generated/" + domName + " /etc/apache2/sites-enabled/010-" + domName +
                    " && invoke-rc.d apache2 reload >/dev/null 2>&1")
        );
        return domSetupProcessor;
    }
hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java
@@ -17,6 +17,7 @@
import de.hsadmin.core.qserv.ShellProcessor;
import de.hsadmin.core.qserv.TemplateProcessor;
import de.hsadmin.core.qserv.WaitingTasksProcessor;
import de.hsadmin.core.util.Config;
import de.hsadmin.core.util.PasswordTool;
import de.hsadmin.mods.user.UnixUser;
@@ -184,7 +185,11 @@
        hiveValues.put("HIVE", hive.getName());
        String hiveIP = hive.getInetAddr().getInetAddr();
        hiveValues.put("HIVE_IP", hiveIP);
        hiveValues.put("HIVE_GATEWAY", hiveIP.substring(0, hiveIP.lastIndexOf('.')) + ".1");
        String defaultGateway =
                Config.getInstance().getProperty("hsadmin.default_gateway", hiveIP.substring(0, hiveIP.lastIndexOf('.')) + ".1");
        defaultGateway =
            Config.getInstance().getProperty("hsadmin." + hive.getName() + ".default_gateway", defaultGateway);
        hiveValues.put("HIVE_GATEWAY", defaultGateway);
        return hiveValues;
    }