-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunner.sh
More file actions
27 lines (21 loc) · 807 Bytes
/
runner.sh
File metadata and controls
27 lines (21 loc) · 807 Bytes
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
#!/bin/bash
if [[ ! -z "${JAVAAGENT_VERSION}" ]]; then
JAVAAGENT="-javaagent:/opt/datadog/dd-java-agent-$JAVAAGENT_VERSION.jar"
fi
SHUTDOWN_CONSOLE_FILE="/tmp/shutdown.pipe"
finish() {
echo "shutdown" > "${SHUTDOWN_CONSOLE_FILE}"
wait &>/dev/null
rm -f "${SHUTDOWN_CONSOLE_FILE}"
if [[ -n "${ISTIO_MESH_ENABLED}" ]]; then
curl --max-time 2 -s -f -XPOST http://127.0.0.1:15020/quitquitquit
fi
}
trap finish EXIT
if [[ -n "${ISTIO_MESH_ENABLED}" ]]; then
while ! curl -s -f http://127.0.0.1:15020/healthz/ready; do sleep 1; done
fi
java -cp '/data/tests.jar' -Dreactor.netty.native=false -Dio.micrometer.shaded.io.netty.transport.noNative=true \
-DstatsDClient=${STATSDCLIENT} ${JAVAAGENT} com.cisco.cognitive.delivery.DataDogMetricPush &
PID=$!
wait $PID &>/dev/null