aboutsummaryrefslogtreecommitdiffstats
path: root/packages/policy-pap-docker/src/main
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@est.tech>2020-01-08 13:03:27 +0000
committerJim Hahn <jrh3@att.com>2020-01-09 14:25:03 +0000
commit46c781f75fd1f29fd15bb81d9b4d640aa315cab8 (patch)
treeec95a3300b3c8005c795cef481a7726b369ba3cb /packages/policy-pap-docker/src/main
parentb64c5e8b7788f602af139480627cbfa34a0d0a22 (diff)
Enabling logback file to be loaded using oom configmap
Change-Id: Iabde1c4b63844f46d5c9a4db23c070b744bf67e5 Issue-ID: POLICY-2308 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
Diffstat (limited to 'packages/policy-pap-docker/src/main')
-rw-r--r--packages/policy-pap-docker/src/main/docker/policy-pap.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/policy-pap-docker/src/main/docker/policy-pap.sh b/packages/policy-pap-docker/src/main/docker/policy-pap.sh
index 7f1d951a..3b27432f 100644
--- a/packages/policy-pap-docker/src/main/docker/policy-pap.sh
+++ b/packages/policy-pap-docker/src/main/docker/policy-pap.sh
@@ -1,7 +1,7 @@
#!/bin/bash
#
# ============LICENSE_START=======================================================
-# Copyright (C) 2019 Nordix Foundation.
+# Copyright (C) 2019-2020 Nordix Foundation.
# Modifications Copyright (C) 2019 AT&T Intellectual Property.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (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.pap.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.pap.main.startstop.Main -c $CONFIG_FILE