#!/bin/sh ########################################################################### # The contents of this file are subject to the license and copyright # detailed in the LICENSE and NOTICE files at the root of the source # tree and available online at # # http://www.dspace.org/license/ ########################################################################### # 'start-handle-server' script # Unix shell script for starting Handle server. WARNING this assumes any # previously running Handle servers have been terminated. # Assume that this script is in the bin subdirectory of the DSpace # installation directory. BINDIR=`dirname $0` # Read parameters from DSpace config DSPACEDIR=`$BINDIR/dspace dsprop --property dspace.dir` HANDLEDIR=`$BINDIR/dspace dsprop --property handle.dir` # Assume log directory is a subdirectory of DSPACEDIR. # If you want your handle server logs stored elsewhere, change this value LOGDIR=$DSPACEDIR/log #Allow user to specify java options through JAVA_OPTS variable if [ "$JAVA_OPTS" = "" ]; then #Default Java to use 256MB of memory JAVA_OPTS=-Xmx256m fi # Remove lock file, in case the old Handle server did not shut down properly rm -f $HANDLEDIR/txns/lock # Start the Handle server, with a special log4j properties file. # We cannot simply write to the same logs, since log4j # does not support more than one JVM writing to the same rolling log. nohup java $JAVA_OPTS -classpath `$BINDIR/dspace classpath` \ -Ddspace.log.init.disable=true \ -Dlog4j.configuration=log4j-handle-plugin.properties \ net.handle.server.Main $HANDLEDIR \ > $LOGDIR/handle-server.log 2>&1 &