Ignore:
Timestamp:
2022-09-06T17:35:33+12:00 (20 months ago)
Author:
davidb
Message:

Need a more carefully constructed way of starting Tomcat with _RUNJAVA specifying xvfb-run-java (when required), but also stopping Tomcat with a regular java (i.e., not the xvfb-run-java version. Solution take is to have gs3-setup.sh set an enviroment variable for this, when bash-script confirms xvfb-run-java is needed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/gs3-setup.sh

    r36543 r36583  
    576576# work out if the system is capable of running webswing
    577577#
    578 # => If a headless server, then needs 'xvfb-run'
     578# => If it can, but is a headless server, then needs 'xvfb-run'
     579
     580export CATALINA_START_RUNJAVA=""
    579581
    580582if [ -f packages/tomcat/webapps/webswing-server.war ] ; then
     
    582584    if [ "$GSDLOS" = "linux" ] && [ "x$DISPLAY" = "x" ] ; then
    583585    # a headless linux server
    584     # => need xvfb-run to be able to operate webswing-server.jar
     586    # => need xvfb-run to be able to operate webswing-server.war
    585587   
    586588    command -v xvfb-run > /dev/null 2>&1
    587589    if [ $? = 0 ] ; then
    588         echo "Setting _RUNJAVA to 'xvfb-run-java'"
     590        echo "Setting CATALINA_START_RUNJAVA to '$GSDL3SRCHOME/bin/script/xvfb-run-java'"
    589591        echo "  => Allows webswing-server.war to graphically render on headless server"
    590         export _JAVARUN="xvfb-run-java"
     592        export CATALINA_START_RUNJAVA="$GSDL3SRCHOME/bin/script/xvfb-run-java"
    591593    else
    592594        echo "Warning: No DISPLAY variable set     => looks like a headless server"
    593         echo "         Unable to detect 'xvfb-run' => webswing-server.war will not function"
     595        echo "         Unable to detect 'xvfb-run' => webswing-server.war unlikely to work"
    594596    fi
    595597    echo ""
    596598    fi
    597599fi
     600
    598601
    599602# Ant
Note: See TracChangeset for help on using the changeset viewer.