-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquickstart
executable file
·122 lines (101 loc) · 2.8 KB
/
quickstart
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#!/bin/bash
#
# This script configures the start information for this server.
#
# The following variables may be used to override the defaults.
# For one-time overrides the variable can be set as part of the command-line; e.g.,
#
# % CQ_PORT=1234 ./start
#
# TCP port used for stop and status scripts
CQ_PORT=4502
# hostname of the interface that this server should listen to
# CQ_HOST=
# show gui
CQ_GUI='true'
# do not show browser on startup
#CQ_NOBROWSER='true'
# do not redirect stdout/stderr (logs to console)
CQ_VERBOSE='true'
# do not fork the JVM
CQ_NOFORK='true'
# force forking the VM using recommended default memory settings
#CQ_FORK='true'
# additional arguments for the forked JVM
#CQ_FORKARGS=''
# runmode(s)
#CQ_RUNMODE=''
# defines the path under which the quickstart work folder is located
#CQ_BASEFOLDER=''
# low memory action
#CQ_LOWMEMACTION=''
# name of the jarfile
#CQ_JARFILE=''
# use jaas.config
# CQ_USE_JAAS='true'
# config for jaas
CQ_JAAS_CONFIG='etc/jaas.config'
# default JVM options
CQ_JVM_OPTS='-server -Xmx1536m -XX:MaxPermSize=256M'
# file size limit (ulimit)
CQ_FILE_SIZE_LIMIT=8192
# ------------------------------------------------------------------------------
# do not configure below this point
# ------------------------------------------------------------------------------
if [ $CQ_FILE_SIZE_LIMIT ]; then
CURRENT_ULIMIT=`ulimit`
if [ $CURRENT_ULIMIT != "unlimited" ]; then
if [ $CURRENT_ULIMIT -lt $CQ_FILE_SIZE_LIMIT ]; then
echo "ulimit ${CURRENT_ULIMIT} is too small (must be at least ${CQ_FILE_SIZE_LIMIT})"
exit 1
fi
fi
fi
BIN_PATH=$(dirname $0)
cd $BIN_PATH/../..
START_OPTS='-use-control-port'
if [ $CQ_PORT ]; then
START_OPTS="${START_OPTS} -p ${CQ_PORT}"
fi
if [ $CQ_GUI ]; then
START_OPTS="${START_OPTS} -gui"
fi
if [ $CQ_NOBROWSER ]; then
START_OPTS="${START_OPTS} -nobrowser"
fi
if [ $CQ_VERBOSE ]; then
START_OPTS="${START_OPTS} -verbose"
fi
if [ $CQ_NOFORK ]; then
START_OPTS="${START_OPTS} -nofork"
fi
if [ $CQ_FORK ]; then
START_OPTS="${START_OPTS} -fork"
fi
if [ $CQ_FORKARGS ]; then
START_OPTS="${START_OPTS} -forkargs ${CQ_FORKARGS}"
fi
if [ $CQ_RUNMODE ]; then
START_OPTS="${START_OPTS} -r ${CQ_RUNMODE}"
fi
if [ $CQ_BASEFOLDER ]; then
START_OPTS="${START_OPTS} -b ${CQ_BASEFOLDER}"
fi
if [ $CQ_LOWMEMACTION ]; then
START_OPTS="${START_OPTS} -low-mem-action ${CQ_LOWMEMACTION}"
fi
if [ $CQ_HOST ]; then
CQ_JVM_OPTS="${CQ_JVM_OPTS} -Dorg.apache.felix.http.host=${CQ_HOST}"
START_OPTS="${START_OPTS} -a ${CQ_HOST}"
fi
if [ $CQ_USE_JAAS ]; then
CQ_JVM_OPTS="${CQ_JVM_OPTS} -Djava.security.auth.login.config=${CQ_JAAS_CONFIG}"
fi
if [ -z $CQ_JARFILE ]; then
CQ_JARFILE=`ls *.jar | head -1`
fi
echo
echo "Starting Java w/ following options: "
echo " $CQ_JVM_OPTS -jar $CQ_JARFILE $START_OPTS"
echo
java $CQ_JVM_OPTS -jar $CQ_JARFILE $START_OPTS