From 46c781f75fd1f29fd15bb81d9b4d640aa315cab8 Mon Sep 17 00:00:00 2001 From: "a.sreekumar" Date: Wed, 8 Jan 2020 13:03:27 +0000 Subject: Enabling logback file to be loaded using oom configmap Change-Id: Iabde1c4b63844f46d5c9a4db23c070b744bf67e5 Issue-ID: POLICY-2308 Signed-off-by: a.sreekumar --- packages/policy-pap-docker/src/main/docker/policy-pap.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'packages') 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 -- cgit 1.2.3-korg