Changeset 19194


Ignore:
Timestamp:
2009-04-22T13:56:44+12:00 (15 years ago)
Author:
ak19
Message:

Deals with the Linux case where the GS2 was not configured with apache-httpd (hence no physical local webserver) but where the gs2-server.sh file exists. In this case, the LocalLibraryServer.start() method first tests whether the apache-httpd directory exists before assuming the local lib server context. This minor change fixes a silent wait error on launching a local gli when the gs2-server.sh file has NOT been renamed and yet the GS2 install was not configured on install with enable-apache-httpd.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/greenstone/LocalLibraryServer.java

    r19030 r19194  
    166166        return;
    167167        }
    168     }
     168    }   
     169
     170    // In the case of the Local Library Server on Linux, we need to do an extra test:
     171    // If GS2 was not configured with --enable-apache-httpd, then there is no apache webserver folder,
     172    // even though the gs2-server.sh file would still be there. That means if the folder is absent
     173    // we still have no local library server.
     174    if(!Utility.isWindows()) {
     175        File localLinuxServerFolder = new File(gsdl_path, "apache-httpd");
     176        if (!localLinuxServerFolder.exists() && !localLinuxServerFolder.isDirectory()) {
     177        System.err.println("The web server does not exist at "
     178                   + localLinuxServerFolder.getAbsolutePath() + "\nNo local library at all. Trying web library");
     179        DebugStream.println("The web server does not exist at "
     180                    + localLinuxServerFolder.getAbsolutePath() + "\nNo local library at all. Trying web library");
     181        return;
     182        }
     183    }
     184
    169185    llssite_cfg_file = new LLSSiteConfig(local_library_server_file);
    170186   
Note: See TracChangeset for help on using the changeset viewer.