Changeset 36543


Ignore:
Timestamp:
2022-09-01T17:51:24+12:00 (20 months ago)
Author:
davidb
Message:

Additional check added in to help Linux machines operate with webswing-server.war

File:
1 edited

Legend:

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

    r36542 r36543  
    571571checkJava
    572572echo ""
     573
     574
     575# If webswing-server.war is present, then (for X-Window systems)
     576# work out if the system is capable of running webswing
     577#
     578# => If a headless server, then needs 'xvfb-run'
     579
     580if [ -f packages/tomcat/webapps/webswing-server.war ] ; then
     581
     582    if [ "$GSDLOS" = "linux" ] && [ "x$DISPLAY" = "x" ] ; then
     583    # a headless linux server
     584    # => need xvfb-run to be able to operate webswing-server.jar
     585   
     586    command -v xvfb-run > /dev/null 2>&1
     587    if [ $? = 0 ] ; then
     588        echo "Setting _RUNJAVA to 'xvfb-run-java'"
     589        echo "  => Allows webswing-server.war to graphically render on headless server"
     590        export _JAVARUN="xvfb-run-java"
     591    else
     592        echo "Warning: No DISPLAY variable set     => looks like a headless server"
     593        echo "         Unable to detect 'xvfb-run' => webswing-server.war will not function"
     594    fi
     595    echo ""
     596    fi
     597fi
    573598
    574599# Ant
Note: See TracChangeset for help on using the changeset viewer.