Changeset 19445

Show
Ignore:
Timestamp:
13.05.2009 15:30:34 (10 years ago)
Author:
ak19
Message:

Silent flag that the user can set to true which will then launch GSI and return the x-term prompt to the user (running GSI in the background), but will then not print any of its output to the screen either.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/gs2-server.sh

    r19427 r19445  
    7979fi 
    8080 
     81##  ---- Determine GSDLHOME ---- 
     82# Set this to true if you want the Greenstone server interface to run in the background 
     83# and not print any error messages to the x-term. 
     84silent=true 
     85 
    8186# JRE_HOME or JAVA_HOME must be set correctly to run this program 
    8287search4j -m $java_min_version &> /dev/null 
     
    101106 
    102107    javapath="`search4j -m $java_min_version -e`" 
    103     # Launch the Greenstone Server Interface application in the background 
    104     # (hence &) so that the x-term prompt will return 
    105     "$javapath" org.greenstone.server.Server2 "$GSDLHOME" "$serverlang" $* & 
     108    if [ "x$silent" == "x" -o "x$silent" != "xtrue" ]; then  
     109        # verbose mode, show all output, but then we can't run the server interface in the background 
     110    "$javapath" org.greenstone.server.Server2 "$GSDLHOME" "$serverlang" $* 
     111    else 
     112        # If we launch the Greenstone Server Interface application in the background (with & at end) 
     113        # need to redirect any STDERR (STDOUT) output to /dev/null first, else output will hog the x-term. 
     114    "$javapath" org.greenstone.server.Server2 "$GSDLHOME" "$serverlang" $* > /dev/null & 
     115    fi 
    106116 
    107117    popd > /dev/null