Fix hv-ves configuration loading from envs
[dcaegen2/collectors/hv-ves.git] / sources / hv-collector-main / src / main / docker / entry.sh
1 #!/usr/bin/env sh
2
3 pid=-1
4
5 handle_sigterm() {
6   if [ ${pid} -ge 0 ]; then
7     echo "Caught SIGTERM signal. Redirecting to process with pid=${pid}"
8     kill -TERM "${pid}"
9     wait ${pid}
10   fi
11   exit 143 # 128 + 15 -- SIGTERM
12 }
13
14 trap "handle_sigterm" TERM
15 java ${JAVA_OPTS} -cp '*:' org.onap.dcae.collectors.veshv.main.MainKt $@ &
16 pid=$!
17 echo "Service started with pid=${pid}"
18 wait ${pid}