forked from hazelcast/hazelcast-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
start-hazelcast.sh
executable file
·44 lines (35 loc) · 1.17 KB
/
start-hazelcast.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
#!/bin/bash
set -euo pipefail
eval JAVA_OPTS=\"${JAVA_OPTS}\"
eval CLASSPATH=\"${CLASSPATH}\"
if [ -n "${CLASSPATH}" ]; then
export CLASSPATH="${CLASSPATH_DEFAULT}:${CLASSPATH}"
else
export CLASSPATH="${CLASSPATH_DEFAULT}"
fi
if [ -n "${JAVA_OPTS}" ]; then
export JAVA_OPTS="${JAVA_OPTS_DEFAULT} ${JAVA_OPTS}"
else
export JAVA_OPTS="${JAVA_OPTS_DEFAULT}"
fi
if [ -n "${PROMETHEUS_PORT}" ]; then
export JAVA_OPTS="-javaagent:${HZ_HOME}/lib/jmx_prometheus_javaagent.jar=${PROMETHEUS_PORT}:${PROMETHEUS_CONFIG} ${JAVA_OPTS}"
fi
if [ -z "${LOGGING_LEVEL}" ]; then
export LOGGING_LEVEL=INFO
fi
if [ -n "${HZ_LICENSE_KEY}" ]; then
export JAVA_OPTS="${JAVA_OPTS} -Dhazelcast.enterprise.license.key=${HZ_LICENSE_KEY}"
else
set +u
export JAVA_OPTS="${JAVA_OPTS} -Dhazelcast.enterprise.license.key=${HZ_LICENCE_KEY}"
set -u
fi
export JAVA_OPTS="${JAVA_OPTS} -Dhazelcast.tls.enabled=${TLS_ENABLED:-false}"
echo "########################################"
echo "# JAVA_OPTS=${JAVA_OPTS}"
echo "# CLASSPATH=${CLASSPATH}"
echo "# starting now...."
echo "########################################"
set -x
exec java -server ${JAVA_OPTS} com.hazelcast.core.server.HazelcastMemberStarter