Changeset 24876 for main/trunk
- Timestamp:
- 2011-12-09T18:45:24+13:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/server/Server2.java
r24614 r24876 35 35 36 36 protected String libraryURL; 37 protected String property_prefix; 37 protected String property_prefix; 38 protected String gsdlos_gsdlarch; 38 39 39 40 private class QuitListener extends Thread … … 106 107 107 108 108 public Server2(String gsdl2_home, String lang, String configfile, int quitPort, String mode)109 public Server2(String gsdl2_home, String gsdlos_arch, String lang, String configfile, int quitPort, String mode) 109 110 { 110 111 super(gsdl2_home, lang, configfile, "etc"+File.separator+"logs-gsi"); … … 112 113 113 114 //logger_.error("gsdlhome: " + gsdl2_home + " | lang: " + lang + " | configfile: " 114 //+ configfile + " | mode: " + property_prefix + " | quitport: " + quitPort); 115 115 //+ configfile + " | gsdlos_gsdlarch: " + gsdlos_arch + " | mode: " + property_prefix + " | quitport: " + quitPort); 116 117 // to get to the OS specific subdirectory of cgi-bin 118 gsdlos_gsdlarch = gsdlos_arch; 119 116 120 // property_prefix is the mode we're running in (gli or empty) and contains the prefix 117 121 // string to look for in config file for auto_enter, start_browser and url properties … … 248 252 // get the prefix from the gsdlsite.cfg and build.properties files (port number and servername) 249 253 try{ 250 File gsdlsite_cfg = new File(gsdl_home + File.separator + "cgi-bin" + File.separator + "gsdlsite.cfg"); 254 File gsdlsite_cfg = new File(gsdl_home + File.separator + "cgi-bin" + File.separator 255 + gsdlos_gsdlarch + File.separator + "gsdlsite.cfg"); 251 256 FileInputStream fin = new FileInputStream(gsdlsite_cfg); 252 257 Properties gsdlProperties = new Properties(); … … 454 459 } 455 460 461 String gsdlos_arch = args[1]; 462 456 463 //for(int i = 0; i < args.length; i++) { System.err.println("Arg[" + i + "]: |" + args[i] + "|"); } 457 464 458 465 // for every subsequent argument, check whether we're dealing with amalgamated 459 466 // parameters in that argument. If so, split on whitespace and reconstruct arguments 460 for(int i = 1; i < args.length; i++) {467 for(int i = 2; i < args.length; i++) { 461 468 462 469 // if the *last* occurrence of a flag parameter is not at the start of … … 493 500 String lang = "en"; 494 501 495 int index = 1; // move onto any subsequent arguments (past 1st GSDLHOMEarg)502 int index = 2; // move onto any subsequent arguments (past 1st GSDLHOME arg and 2nd GSDLOS_GSDLARCH arg) 496 503 if (args.length > index && !args[index].startsWith("--")) { 497 504 lang = args[index]; // 2nd arg is not a flag option, so must be language … … 535 542 //System.err.println("\n\n*******\n\ngsdlhome: " + gsdl2_home + " | lang: " + lang + " |configfile:" 536 543 // + configfile + "| mode: " + mode + " | quitport: " + port + "\n\n*************\n"); 537 new Server2(gsdl2_home, lang, configfile, port, mode);544 new Server2(gsdl2_home, gsdlos_arch, lang, configfile, port, mode); 538 545 } 539 546 }
Note:
See TracChangeset
for help on using the changeset viewer.