forked from swissbib/vufind
-
Notifications
You must be signed in to change notification settings - Fork 2
/
solr.sh
executable file
·68 lines (58 loc) · 1.14 KB
/
solr.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/sh
#
# Startup script for the VuFind Jetty Server under *nix systems
#
# Configuration variables
#
# VUFIND_HOME
# Home of the VuFind installation.
#
# SOLR_BIN
# Home of the Solr executable scripts.
#
# SOLR_HEAP
# Size of the Solr heap (i.e. 512M, 2G, etc.). Defaults to 1G.
#
# SOLR_HOME
# Home of the Solr indexes and configurations.
#
# SOLR_PORT
# Network port for Solr. Defaults to 8080.
#
# JAVA_HOME
# Home of Java installation (not directly used by this script, but passed along to
# the standard Solr control script).
#
usage()
{
echo "Usage: $0 {start|stop|restart|status}"
exit 1
}
[ $# -gt 0 ] || usage
# Set VUFIND_HOME
if [ -z "$VUFIND_HOME" ]
then
VUFIND_HOME=`dirname $0`
fi
if [ -z "$SOLR_HOME" ]
then
SOLR_HOME="$VUFIND_HOME/solr/vufind"
fi
if [ -z "$SOLR_LOGS_DIR" ]
then
SOLR_LOGS_DIR="$SOLR_HOME/logs"
fi
if [ -z "$SOLR_BIN" ]
then
SOLR_BIN="$VUFIND_HOME/solr/vendor/bin"
fi
if [ -z "$SOLR_HEAP" ]
then
SOLR_HEAP="1G"
fi
if [ -z "$SOLR_PORT" ]
then
SOLR_PORT="8080"
fi
export SOLR_LOGS_DIR=$SOLR_LOGS_DIR
$SOLR_BIN/solr $1 -p $SOLR_PORT -s $SOLR_HOME -m $SOLR_HEAP -a "-Dsolr.log=$SOLR_LOGS_DIR"