| | |
| | | import org.opends.quicksetup.installer.SuffixesToReplicateOptions; |
| | | import org.opends.quicksetup.ui.UIFactory; |
| | | import org.opends.server.util.SetupUtils; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | | |
| | | /** |
| | |
| | | public static String getInstancePathFromInstallPath(String installPath) |
| | | { |
| | | String instancePathFileName = Installation.INSTANCE_LOCATION_PATH; |
| | | File configureScriptPath = new File(installPath + File.separator + |
| | | Installation.UNIX_CONFIGURE_FILE_NAME); |
| | | File _svcScriptPathName = new File(installPath + File.separator + |
| | | Installation.LIBRARIES_PATH_RELATIVE + File.separator + |
| | | "_svc-opendj.sh"); |
| | | |
| | | // look for /etc/opt/opends/instance.loc |
| | | // look for /etc/opt/opendj/instance.loc |
| | | File f = new File(instancePathFileName); |
| | | if (!configureScriptPath.exists() || !f.exists()) { |
| | | if (!_svcScriptPathName.exists() || !f.exists()) { |
| | | // look for <installPath>/instance.loc |
| | | instancePathFileName = installPath + File.separator + |
| | | Installation.INSTANCE_LOCATION_PATH_RELATIVE; |
| | |
| | | } |
| | | finally |
| | | { |
| | | try |
| | | { |
| | | reader.close(); |
| | | } catch (Exception e) { /* do nothing */} |
| | | StaticUtils.close(reader); |
| | | } |
| | | } |
| | | |