- Timestamp:
- 2013-07-12T17:12:13+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/server/Server3.java
r26001 r27827 15 15 public class Server3 extends BaseServer 16 16 { 17 String opt_ant_properties = null; 17 18 18 19 public Server3(String gsdl3_src_home, String lang) … … 31 32 STOP_CMD = "force-stop-tomcat"; 32 33 34 String is_read_only = System.getProperty("gsdl3home.isreadonly","false"); 35 if (is_read_only.equals("true")) { 36 String default_gsdl3_home = gsdl3_src_home + File.separatorChar + "web"; 37 String gsdl3_writablehome = System.getProperty("gsdl3.writablehome",default_gsdl3_home); 38 opt_ant_properties = "-Dgsdl3home.isreadonly=true -Dgsdl3.writablehome="+gsdl3_writablehome; 39 } 40 33 41 autoStart(); 34 42 } … … 36 44 protected int runTarget(String cmd) 37 45 { 38 RunAnt runAnt = new RunAnt( );46 RunAnt runAnt = new RunAnt(opt_ant_properties); 39 47 runAnt.setTargetCmd(cmd); 40 48 runAnt.run(); … … 84 92 gsdl3_home = fallbackGSDL3Home(); 85 93 } 86 String propsFolder = gsdl3_home + File.separator + "WEB-INF" + File.separator + "classes" + File.separator; 94 95 String gsdl3_writablehome = System.getProperty("gsdl3.writablehome",gsdl3_home); 96 97 String propsFolder = gsdl3_writablehome + File.separator + "WEB-INF" + File.separator + "classes" + File.separator; 87 98 File propsFile = new File(propsFolder+"log4j.properties"); 88 99 89 100 // create it from the template file GS3/resources/java/log4j.properties.in 90 if(!propsFile.exists()) { 101 // Always do this => helps make Greenstone3 portable 102 103 91 104 try { 92 105 // need to set gsdl3.home property's value to be gsdl_home/web, … … 102 115 // set gsdl3.home to web home 103 116 logProps.setProperty("gsdl3.home", gsdl3_home); 117 logProps.setProperty("gsdl3.writablehome", gsdl3_writablehome); 104 118 105 119 // write the customised properties out to a custom log4j.properties file … … 116 130 e.printStackTrace(); 117 131 } 118 }119 132 120 133 // now configure the logger with the custom log4j.properties file
Note:
See TracChangeset
for help on using the changeset viewer.