| | |
| | | |
| | | import java.io.File; |
| | | import java.io.PrintWriter; |
| | | import java.nio.file.Files; |
| | | import java.util.Collection; |
| | | import java.util.Date; |
| | | import java.util.Iterator; |
| | |
| | | * |
| | | * Properties: |
| | | * GenerationDir - The directory where the doc is generated |
| | | * (default is /var/tmp/[CONFIG_GUIDE_DIR>]) |
| | | * (default is a fresh temporary directory, printed on startup) |
| | | * LdapMapping - Presence means that the LDAP mapping section is to be |
| | | * generated (default is no) |
| | | * OpenDJWiki - The URL of the OpenDJ Wiki |
| | |
| | | public static void main(String[] args) { |
| | | Properties properties = System.getProperties(); |
| | | generationDir = properties.getProperty("GenerationDir"); |
| | | if (generationDir == null) { |
| | | // Default dir is prefixed by the system-dependent default temporary dir |
| | | generationDir = System.getProperty("java.io.tmpdir") + File.separator + |
| | | CONFIG_GUIDE_DIR; |
| | | } |
| | | // Create new dir if necessary |
| | | try { |
| | | new File(generationDir).mkdir(); |
| | | if (generationDir == null) { |
| | | // Default dir is a fresh temporary dir, only accessible by the current user |
| | | generationDir = Files.createTempDirectory(CONFIG_GUIDE_DIR).toString(); |
| | | } else { |
| | | // Create new dir if necessary |
| | | new File(generationDir).mkdir(); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | System.exit(1); |