Ignore:
Timestamp:
2009-04-01T19:31:09+13:00 (15 years ago)
Author:
ak19
Message:

Updated Server files for Linux GS2 Local Library Server to work the same way as the Windows GS2 LLS. Basically the major difference is that build.properties is no longer used but glisite.cfg or llssite.cfg depending on whether or not gs2-server.sh is launched from gli. There are a few additional changes required for this to keep it consistent with the way the Windows GS2 LLS works: storing the preview URL in glisite.cfg/llssite.cfg while the server is running and removing it when the server has stopped, Server2.java's main method taking the configfile as an additional parameter (and corresponding adjustments in the gsicontrol.sh script of GS2).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/src/java/org/greenstone/server/BaseServerSettings.java

    r18710 r18868  
    4444
    4545        try {
    46         this.portNum = Integer.parseInt(server.build_properties.getProperty(BaseServer.Property.WEB_PORT));
     46        this.portNum = Integer.parseInt(server.config_properties.getProperty(BaseServer.Property.WEB_PORT));
    4747    }
    4848        catch(Exception e){
     
    5050    }
    5151
    52         this.browserPath = server.build_properties.getProperty(BaseServer.Property.BROWSER_PATH);
     52        this.browserPath = server.config_properties.getProperty(BaseServer.Property.BROWSER_PATH);
    5353       
    5454        if (this.browserPath == null || this.browserPath.equals("")){
     
    6060    }
    6161
    62     String auto_start_str = server.build_properties.getProperty(BaseServer.Property.AUTOSTART);
     62    String auto_start_str = server.config_properties.getProperty(BaseServer.Property.AUTOSTART);
    6363    if ((auto_start_str.trim()).equals("true")) {
    6464        this.autoStart = true;
     
    222222   
    223223    public void actionPerformed(ActionEvent ev) {
    224         // save everything to build_properties if things have changed
     224        // save everything to config_properties if things have changed
    225225         boolean has_changed = false;
    226226             boolean require_restart = false;
     
    268268       
    269269        ScriptReadWrite scriptReadWrite = new ScriptReadWrite();
    270         oldFileLines = scriptReadWrite.readInFile(BaseServer.build_properties_file);
     270        oldFileLines = scriptReadWrite.readInFile(BaseServer.config_properties_file);
    271271       
    272272        newFileLines = scriptReadWrite.queryReplace(oldFileLines, BaseServer.Property.WEB_PORT, portNum+"");
     
    284284        newFileLines = scriptReadWrite.queryReplace(newFileLines,BaseServer.Property.BROWSER_PATH, browserPath);
    285285
    286         scriptReadWrite.writeOutFile(BaseServer.build_properties_file,
     286        scriptReadWrite.writeOutFile(BaseServer.config_properties_file,
    287287                         newFileLines);
    288         server.reloadBuildProperties();
     288        server.reloadConfigProperties();
    289289        if (require_restart){
    290290            JOptionPane.showMessageDialog(null,server.dictionary.get("ServerSetting.SettingChanged"),"Info", JOptionPane.INFORMATION_MESSAGE);
Note: See TracChangeset for help on using the changeset viewer.