3 # ============LICENSE_START=======================================================
4 # Copyright (C) 2019 Nordix Foundation.
5 # ================================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 # SPDX-License-Identifier: Apache-2.0
19 # ============LICENSE_END=========================================================
21 # @author Waqas Ikram (waqas.ikram@est.tech)
25 if [ "$(ls -1 /app/ca-certificates)" ]; then
27 for certificate in `ls -1 /app/ca-certificates`; do
28 echo "Installing $certificate in /usr/local/share/ca-certificates"
29 cp /app/ca-certificates/$certificate /usr/local/share/ca-certificates/$certificate
32 if [ $needUpdate = TRUE ]; then
33 echo "Updating ca-certificates . . ."
34 update-ca-certificates --fresh
38 if [ -z "$APP" ]; then
39 echo "CONFIG ERROR: APP environment variable not set"
43 echo "Starting $APP simulator ... "
45 if [ -z "${CONFIG_PATH}" ]; then
46 export CONFIG_PATH=/app/config/override.yaml
49 if [ -z "${LOG_PATH}" ]; then
50 export LOG_PATH="logs/${APP}"
53 if [ "${SSL_DEBUG}" = "log" ]; then
54 export SSL_DEBUG="-Djavax.net.debug=all"
60 jvmargs="${JVM_ARGS} -Dlogs_dir=${LOG_PATH} -Dlogging.config=/app/logback-spring.xml -Dspring.config.additional-location=$CONFIG_PATH ${SSL_DEBUG} ${DISABLE_SNI}"
62 echo "JVM Arguments: ${jvmargs}"
64 java ${jvmargs} -jar app.jar
67 echo "Application exiting with status code $rc"