aboutsummaryrefslogtreecommitdiffstats
path: root/packages/policy-api-docker/src/main
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@est.tech>2020-01-08 13:02:10 +0000
committerJim Hahn <jrh3@att.com>2020-01-09 14:25:20 +0000
commit1d801e7c49105b19ac7bfd3f7addbac995fd1dc8 (patch)
tree011e656c643e1935a1151a2212053ad83e2b0138 /packages/policy-api-docker/src/main
parent5cbebbcfe63830d8593d6ce31ccf2fb56c1622e3 (diff)
Enabling logback file to be loaded using oom configmap
Change-Id: I839b687716a72e2538495b46660fa697cdc2f4f8 Issue-ID: POLICY-2308 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
Diffstat (limited to 'packages/policy-api-docker/src/main')
-rw-r--r--packages/policy-api-docker/src/main/docker/policy-api.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/policy-api-docker/src/main/docker/policy-api.sh b/packages/policy-api-docker/src/main/docker/policy-api.sh
index e2242dda..dbd8cc03 100644
--- a/packages/policy-api-docker/src/main/docker/policy-api.sh
+++ b/packages/policy-api-docker/src/main/docker/policy-api.sh
@@ -2,7 +2,7 @@
#
# ============LICENSE_START=======================================================
# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
-# Modifications Copyright (C) 2019 Nordix Foundation.
+# Modifications Copyright (C) 2019-2020 Nordix Foundation.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -50,4 +50,9 @@ if [[ -f "${POLICY_HOME}"/etc/mounted/policy-keystore ]]; then
cp -f "${POLICY_HOME}"/etc/mounted/policy-keystore "${KEYSTORE}"
fi
-$JAVA_HOME/bin/java -cp "${POLICY_HOME}/etc:${POLICY_HOME}/lib/*" -Djavax.net.ssl.keyStore="$KEYSTORE" -Djavax.net.ssl.keyStorePassword="$KEYSTORE_PASSWD" -Djavax.net.ssl.trustStore="$TRUSTSTORE" -Djavax.net.ssl.trustStorePassword="$TRUSTSTORE_PASSWD" org.onap.policy.api.main.startstop.Main -c $CONFIG_FILE
+if [[ -f "${POLICY_HOME}"/etc/mounted/logback.xml ]]; then
+ echo "overriding logback.xml"
+ cp -f "${POLICY_HOME}"/etc/mounted/logback.xml "${POLICY_HOME}"/etc/
+fi
+
+$JAVA_HOME/bin/java -cp "${POLICY_HOME}/etc:${POLICY_HOME}/lib/*" -Dlogback.configurationFile=$POLICY_HOME/etc/logback.xml -Djavax.net.ssl.keyStore="$KEYSTORE" -Djavax.net.ssl.keyStorePassword="$KEYSTORE_PASSWD" -Djavax.net.ssl.trustStore="$TRUSTSTORE" -Djavax.net.ssl.trustStorePassword="$TRUSTSTORE_PASSWD" org.onap.policy.api.main.startstop.Main -c $CONFIG_FILE