source: vlo/trunk/vlo-importer/src/main/bin/vlo_solr_importer.sh @ 6082

Last change on this file since 6082 was 6082, checked in by Twan Goosen, 9 years ago

VLO distribution creates a 'log' directory. Importer start script sets a JVM variable so that log4j knows where to log.
Fixes #741

File size: 1.1 KB
Line 
1#!/bin/sh
2
3# Get the script's source directory
4DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5
6# Filter of the Error stream from which to prevent the admins from getting daily
7#  "can't find java" emails
8JAVA=`which java 2>/dev/null`
9if [  -z $JAVA ]; then
10#set java for mpi servers
11JAVA=/lat/java/bin/java
12fi
13
14# try to get the configuration file name from the command line options
15if [ 1 -eq $# ]; then
16CONFIG=$1
17else
18# fall back to default location
19echo No configuration location specified, using default
20CONFIG=${DIR}/"../config/VloConfig.xml"
21fi
22
23LOGDIR=${DIR}/../log/
24echo Logging in ${LOGDIR}
25
26# Please specify the configuration to the importer via a system property or via
27# the command line. In case of a property add
28#
29# -DconfigFile=<pathToConfigFile>
30#
31# and in case of the command line, add
32#
33# -c <pathToConfigFile>
34#
35# to the JAVA command. Please note the a specification on the command line will
36# take preference over a specification as a property.
37
38$JAVA -Xmx2024M \
39    -cp "${DIR}:${DIR}/vlo-importer-3.2-SNAPSHOT-importer.jar" \
40    -DIMPORTER_LOG_DIR=${LOGDIR} \
41    eu.clarin.cmdi.vlo.importer.MetadataImporter -c "$CONFIG"
42
Note: See TracBrowser for help on using the repository browser.