* [ 1652376 ] Silent install and web port <> 80
This commit is contained in:
parent
9476cf2687
commit
febc4d164d
|
@ -192,10 +192,14 @@ public class ConfigurationData
|
||||||
log.info(env.toString());
|
log.info(env.toString());
|
||||||
if (p_properties.size() > 5)
|
if (p_properties.size() > 5)
|
||||||
envLoaded = true;
|
envLoaded = true;
|
||||||
|
|
||||||
|
Properties loaded = new Properties();
|
||||||
|
loaded.putAll(p_properties);
|
||||||
//
|
//
|
||||||
int javaIndex = setJavaType((String)p_properties.get(JAVA_TYPE));
|
int javaIndex = setJavaType((String)p_properties.get(JAVA_TYPE));
|
||||||
initJava(javaIndex);
|
initJava(javaIndex);
|
||||||
setJavaHome((String)p_properties.get(JAVA_HOME));
|
if (loaded.containsKey(JAVA_HOME))
|
||||||
|
setJavaHome((String)loaded.get(JAVA_HOME));
|
||||||
//
|
//
|
||||||
setAdempiereHome((String)p_properties.get(ADEMPIERE_HOME));
|
setAdempiereHome((String)p_properties.get(ADEMPIERE_HOME));
|
||||||
String s = (String)p_properties.get(ADEMPIERE_KEYSTOREPASS);
|
String s = (String)p_properties.get(ADEMPIERE_KEYSTOREPASS);
|
||||||
|
@ -208,22 +212,33 @@ public class ConfigurationData
|
||||||
//
|
//
|
||||||
int appServerIndex = setAppsServerType((String)p_properties.get(ADEMPIERE_APPS_TYPE));
|
int appServerIndex = setAppsServerType((String)p_properties.get(ADEMPIERE_APPS_TYPE));
|
||||||
initAppsServer(appServerIndex);
|
initAppsServer(appServerIndex);
|
||||||
setAppsServer((String)p_properties.get(ADEMPIERE_APPS_SERVER));
|
if (loaded.containsKey(ADEMPIERE_APPS_SERVER))
|
||||||
setAppsServerDeployDir((String)p_properties.get(ADEMPIERE_APPS_DEPLOY));
|
setAppsServer((String)loaded.get(ADEMPIERE_APPS_SERVER));
|
||||||
setAppsServerJNPPort((String)p_properties.get(ADEMPIERE_JNP_PORT));
|
if (loaded.containsKey(ADEMPIERE_APPS_DEPLOY))
|
||||||
setAppsServerWebPort((String)p_properties.get(ADEMPIERE_WEB_PORT));
|
setAppsServerDeployDir((String)loaded.get(ADEMPIERE_APPS_DEPLOY));
|
||||||
setAppsServerSSLPort((String)p_properties.get(ADEMPIERE_SSL_PORT));
|
if (loaded.containsKey(ADEMPIERE_JNP_PORT))
|
||||||
|
setAppsServerJNPPort((String)loaded.get(ADEMPIERE_JNP_PORT));
|
||||||
|
if (loaded.containsKey(ADEMPIERE_WEB_PORT))
|
||||||
|
setAppsServerWebPort((String)loaded.get(ADEMPIERE_WEB_PORT));
|
||||||
|
if (loaded.containsKey(ADEMPIERE_SSL_PORT))
|
||||||
|
setAppsServerSSLPort((String)loaded.get(ADEMPIERE_SSL_PORT));
|
||||||
//
|
//
|
||||||
int dbTypeIndex = setDatabaseType((String)p_properties.get(ADEMPIERE_DB_TYPE));
|
int dbTypeIndex = setDatabaseType((String)p_properties.get(ADEMPIERE_DB_TYPE));
|
||||||
initDatabase((String)p_properties.get(ADEMPIERE_DB_NAME), dbTypeIndex); // fills Database Options
|
initDatabase((String)p_properties.get(ADEMPIERE_DB_NAME), dbTypeIndex); // fills Database Options
|
||||||
setDatabaseDiscovered((String)p_properties.get(ADEMPIERE_DB_NAME));
|
if (loaded.containsKey(ADEMPIERE_DB_NAME))
|
||||||
setDatabaseServer((String)p_properties.get(ADEMPIERE_DB_SERVER));
|
setDatabaseDiscovered((String)loaded.get(ADEMPIERE_DB_NAME));
|
||||||
setDatabasePort((String)p_properties.get(ADEMPIERE_DB_PORT));
|
if (loaded.containsKey(ADEMPIERE_DB_SERVER))
|
||||||
setDatabaseName((String)p_properties.get(ADEMPIERE_DB_NAME));
|
setDatabaseServer((String)loaded.get(ADEMPIERE_DB_SERVER));
|
||||||
|
if (loaded.containsKey(ADEMPIERE_DB_PORT))
|
||||||
setDatabaseUser((String)p_properties.get(ADEMPIERE_DB_USER));
|
setDatabasePort((String)loaded.get(ADEMPIERE_DB_PORT));
|
||||||
setDatabasePassword((String)p_properties.get(ADEMPIERE_DB_PASSWORD));
|
if (loaded.containsKey(ADEMPIERE_DB_NAME))
|
||||||
setDatabaseSystemPassword((String)p_properties.get(ADEMPIERE_DB_SYSTEM));
|
setDatabaseName((String)loaded.get(ADEMPIERE_DB_NAME));
|
||||||
|
if (loaded.containsKey(ADEMPIERE_DB_USER))
|
||||||
|
setDatabaseUser((String)loaded.get(ADEMPIERE_DB_USER));
|
||||||
|
if (loaded.containsKey(ADEMPIERE_DB_PASSWORD))
|
||||||
|
setDatabasePassword((String)loaded.get(ADEMPIERE_DB_PASSWORD));
|
||||||
|
if (loaded.containsKey(ADEMPIERE_DB_SYSTEM))
|
||||||
|
setDatabaseSystemPassword((String)loaded.get(ADEMPIERE_DB_SYSTEM));
|
||||||
|
|
||||||
if (p_panel != null)
|
if (p_panel != null)
|
||||||
{
|
{
|
||||||
|
@ -643,6 +658,7 @@ public class ConfigurationData
|
||||||
*/
|
*/
|
||||||
protected boolean testPort (String protocol, String server, int port, String file)
|
protected boolean testPort (String protocol, String server, int port, String file)
|
||||||
{
|
{
|
||||||
|
System.out.println("testPort[" + protocol + "," + server + ", " + port + ", " + file +"]");
|
||||||
URL url = null;
|
URL url = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -679,6 +695,7 @@ public class ConfigurationData
|
||||||
*/
|
*/
|
||||||
protected boolean testServerPort (int port)
|
protected boolean testServerPort (int port)
|
||||||
{
|
{
|
||||||
|
System.out.println("testServerPort: " + port);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ServerSocket ss = new ServerSocket (port);
|
ServerSocket ss = new ServerSocket (port);
|
||||||
|
@ -703,6 +720,7 @@ public class ConfigurationData
|
||||||
*/
|
*/
|
||||||
protected boolean testPort (InetAddress host, int port, boolean shouldBeUsed)
|
protected boolean testPort (InetAddress host, int port, boolean shouldBeUsed)
|
||||||
{
|
{
|
||||||
|
System.out.println("testPort[" + host.getHostAddress() + ", " + port + "]");
|
||||||
Socket pingSocket = null;
|
Socket pingSocket = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -928,10 +946,7 @@ public class ConfigurationData
|
||||||
p_panel.fJavaType.setSelectedIndex(0);
|
p_panel.fJavaType.setSelectedIndex(0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
m_javaConfig[index].init();
|
||||||
if (getJavaHome() == null)
|
|
||||||
m_javaConfig[index].init();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1050,14 +1065,7 @@ public class ConfigurationData
|
||||||
p_panel.fAppsType.setSelectedIndex(0);
|
p_panel.fAppsType.setSelectedIndex(0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
m_appsConfig[index].init();
|
||||||
if (getAppsServerDeployDir() == null ||
|
|
||||||
getAppsServerJNPPort() <= 0 ||
|
|
||||||
getAppsServerSSLPort() <= 0 ||
|
|
||||||
getAppsServerWebPort() <= 0)
|
|
||||||
m_appsConfig[index].init();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1343,8 +1351,7 @@ public class ConfigurationData
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (getDatabasePort() <= 0)
|
m_databaseConfig[index].init();
|
||||||
m_databaseConfig[index].init();
|
|
||||||
|
|
||||||
if (p_panel != null)
|
if (p_panel != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,7 +31,12 @@ public class SilentSetup {
|
||||||
Ini.setShowLicenseDialog(false);
|
Ini.setShowLicenseDialog(false);
|
||||||
ConfigurationData data = new ConfigurationData(null);
|
ConfigurationData data = new ConfigurationData(null);
|
||||||
if (!data.load()) return;
|
if (!data.load()) return;
|
||||||
if (!data.test()) return;
|
if (!data.test())
|
||||||
|
{
|
||||||
|
System.err.println("");
|
||||||
|
System.err.println("Warning: One or more of the configuration test failed.");
|
||||||
|
System.err.println("");
|
||||||
|
}
|
||||||
if (!data.save()) return;
|
if (!data.save()) return;
|
||||||
|
|
||||||
/** Run Ant **/
|
/** Run Ant **/
|
||||||
|
|
Loading…
Reference in New Issue