5 # Install certificates found in the /app/ca-certificates volume, if any.
9 for certificate in `ls -1 /app/ca-certificates`; do
10 echo "Installing $certificate in /usr/local/share/ca-certificates"
11 cp /app/ca-certificates/$certificate /usr/local/share/ca-certificates/$certificate
15 if [ $needUpdate = TRUE ]; then
16 update-ca-certificates --fresh
19 # Re-exec this script as the 'so' user.
26 if [ -z "$APP" ]; then
27 echo "CONFIG ERROR: APP environment variable not set"
31 if [ ! -z "$DB_HOST" -a -z "$DB_PORT" ]; then
35 if [ -z "${CONFIG_PATH}" ]; then
36 export CONFIG_PATH=/app/config/override.yaml
39 if [ -z "${LOG_PATH}" ]; then
40 export LOG_PATH="logs/${APP}"
43 if [ ${APP} = "asdc-controller" ]; then
44 ln -s ${LOG_PATH} ASDC
47 if [ ${APP} = "bpmn-infra" ]; then
48 ln -s ${LOG_PATH} BPMN
51 if [ ${APP} = "openstack-adapter" ]; then
52 export DISABLE_SNI="-Djsse.enableSNIExtension=false"
55 if [ "${SSL_DEBUG}" = "log" ]; then
56 export SSL_DEBUG="-Djavax.net.debug=all"
61 # Set java keystore and truststore options, if specified in the environment.
65 if [ ! -z "${KEYSTORE}" ]; then
66 jksargs="$jksargs -Dmso.load.ssl.client.keystore=true"
67 jksargs="$jksargs -Djavax.net.ssl.keyStore=$KEYSTORE"
68 jksargs="$jksargs -Djavax.net.ssl.keyStorePassword=${KEYSTORE_PASSWORD}"
71 if [ ! -z "${TRUSTSTORE}" ]; then
72 jksargs="$jksargs -Djavax.net.ssl.trustStore=${TRUSTSTORE}"
73 jksargs="$jksargs -Djavax.net.ssl.trustStorePassword=${TRUSTSTORE_PASSWORD}"
76 jvmargs="${JVM_ARGS} -Djava.security.egd=file:/dev/./urandom -Dlogs_dir=${LOG_PATH} -Dlogging.config=/app/logback-spring.xml $jksargs -Dspring.config.location=$CONFIG_PATH ${SSL_DEBUG} ${DISABLE_SNI}"
78 echo "JVM Arguments: ${jvmargs}"
80 java ${jvmargs} -jar app.jar
83 echo "Application exiting with status code $rc"
85 if [ ! -z "${EXIT_DELAY}" -a "${EXIT_DELAY}" != 0 ]; then
86 echo "Delaying $APP exit for $EXIT_DELAY seconds"