make default gw configurable
This commit is contained in:
parent
8abad315d4
commit
5646148b7e
@ -252,7 +252,9 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
|
|||||||
Processor domSetupProcessor = new CompoundProcessor(
|
Processor domSetupProcessor = new CompoundProcessor(
|
||||||
createDomainDirectoriesProcessor(dom, templateVars),
|
createDomainDirectoriesProcessor(dom, templateVars),
|
||||||
new CreateFileProcessor(selectVHostTemplate(dom), templateVars, "/etc/apache2/sites-generated/" + domName, "root", "root", "644"),
|
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;
|
return domSetupProcessor;
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ import de.hsadmin.core.qserv.ProcessorException;
|
|||||||
import de.hsadmin.core.qserv.ShellProcessor;
|
import de.hsadmin.core.qserv.ShellProcessor;
|
||||||
import de.hsadmin.core.qserv.TemplateProcessor;
|
import de.hsadmin.core.qserv.TemplateProcessor;
|
||||||
import de.hsadmin.core.qserv.WaitingTasksProcessor;
|
import de.hsadmin.core.qserv.WaitingTasksProcessor;
|
||||||
|
import de.hsadmin.core.util.Config;
|
||||||
import de.hsadmin.core.util.PasswordTool;
|
import de.hsadmin.core.util.PasswordTool;
|
||||||
import de.hsadmin.mods.user.UnixUser;
|
import de.hsadmin.mods.user.UnixUser;
|
||||||
|
|
||||||
@ -184,7 +185,11 @@ public class PacProcessorFactory implements EntityProcessorFactory {
|
|||||||
hiveValues.put("HIVE", hive.getName());
|
hiveValues.put("HIVE", hive.getName());
|
||||||
String hiveIP = hive.getInetAddr().getInetAddr();
|
String hiveIP = hive.getInetAddr().getInetAddr();
|
||||||
hiveValues.put("HIVE_IP", hiveIP);
|
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;
|
return hiveValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user