-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-entrypoint-coap-transport.sh
More file actions
48 lines (35 loc) · 1.44 KB
/
docker-entrypoint-coap-transport.sh
File metadata and controls
48 lines (35 loc) · 1.44 KB
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
#!/bin/bash
appName="ThingsBoard COAP Transport Microservice"
appCode="tb-coap-transport"
appMainClass="org.thingsboard.server.coap.ThingsboardCoapTransportApplication"
jarFilePath="/app/bin/$appCode.jar"
logbackFilePath="/app/conf/logback.xml"
cd /app/bin
if [ "$ENABLE_REMOTE_JMX" = "true" ]; then
if [ -z "$REMOTE_JMX_PORT" ]; then
REMOTE_JMX_PORT=49090
fi
if [ -z "$REMOTE_JMX_HOST" ]; then
REMOTE_JMX_HOST=0.0.0.0
fi
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote=true"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.local.only=false"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=$REMOTE_JMX_PORT"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.rmi.port=$REMOTE_JMX_PORT"
JAVA_OPTS="$JAVA_OPTS -Djava.rmi.server.hostname=$REMOTE_JMX_HOST"
fi
if [ "$ENABLE_DEBUGGING" = "true" ] || [ "$ENABLE_DEBUGGING" = "1" ]; then
if [ -z "$DEBUGGER_PORT" ]; then
DEBUGGER_PORT=47358
fi
JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:$DEBUGGER_PORT"
fi
echo "Starting '$appName' ..."
exec java -cp \
"$jarFilePath" \
$JAVA_OPTS \
-Dloader.main=$appMainClass \
-Dlogging.config="$logbackFilePath" \
org.springframework.boot.loader.launch.PropertiesLauncher