Changeset 27830


Ignore:
Timestamp:
07/12/13 17:30:55 (8 years ago)
Author:
davidb
Message:

Additional work to help support Greenstone running off a read-only medium, such as a DVD

File:
1 edited

Legend:

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

    r20188 r27830  
    2424}
    2525
     26check_gsdl3home_writable() {
     27
     28    echo "Checking if the Greenstone3 web directory is writable ..."
     29    (echo "This is a temporary file. It is safe to delete it." > "$GSDL3HOME/testing.tmp" ) 2>/dev/null
     30    if [ -e "$GSDL3HOME/testing.tmp" ] ; then
     31    /bin/rm "$GSDL3HOME/testing.tmp"
     32    gsdl3home_isreadonly=0
     33    echo " ... yes."
     34    else
     35    gsdl3home_isreadonly=1
     36    gsdl3_writablehome="/tmp/greenstone/web"
     37
     38    echo " ... no."
     39    echo "Setting Greenstone3 web home writable area to be: $gsdl3_writablehome"
     40    fi
     41}
    2642
    2743echo "Greenstone 3 Server"
     
    4662popd > /dev/null
    4763
     64check_gsdl3home_writable
     65
     66opt_properties=
     67if [ $gsdl3home_isreadonly = 1 ] ; then
     68    opt_properties="-Dgsdl3home.isreadonly=true -Dgsdl3.writablehome=$gsdl3_writablehome"
     69fi
     70
    4871# JRE_HOME or JAVA_HOME must be set correctly to run this program
    4972HINT="`pwd`/packages/jre"
     
    5477    pushd "$gsdl3path" > /dev/null
    5578
    56     "$javapath" org.greenstone.server.Server3 "$GSDL3SRCHOME" $serverlang
     79    "$javapath" $opt_properties org.greenstone.server.Server3 "$GSDL3SRCHOME" $serverlang
    5780
    5881    popd > /dev/null
Note: See TracChangeset for help on using the changeset viewer.