Fix HTTPS host definition.
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / internal / kernel / InitUtils.java
index ef6a267c6e85150c1e566905412ec8066436537d..2d193fe7da84106a318e39d34362589d16e56c2f 100644 (file)
@@ -101,7 +101,7 @@ class InitUtils {
                        if (httpHost != null)
                                props.put(HttpConstants.HTTP_HOST, httpHost);
                        if (httpsHost != null)
-                               props.put(HttpConstants.HTTPS_HOST, httpHost);
+                               props.put(HttpConstants.HTTPS_HOST, httpsHost);
 
                        if (webSocketEnabled != null)
                                if (webSocketEnabled.equals("true"))
@@ -162,8 +162,9 @@ class InitUtils {
                                try {
                                        FileUtils.copyInputStreamToFile(InitUtils.class.getResourceAsStream(demoBaseDn + ".ldif"),
                                                        businessRolesFile);
-                                       FileUtils.copyInputStreamToFile(
-                                                       InitUtils.class.getResourceAsStream("example-ou=roles,ou=node.ldif"), systemRolesFile);
+                                       if (!systemRolesFile.exists())
+                                               FileUtils.copyInputStreamToFile(
+                                                               InitUtils.class.getResourceAsStream("example-ou=roles,ou=node.ldif"), systemRolesFile);
                                } catch (IOException e) {
                                        throw new CmsException("Cannot copy demo resources", e);
                                }