From 6e8f86143b8a715aaca42a503362f5b38b2b6eba Mon Sep 17 00:00:00 2001 From: jhh Date: Thu, 17 Oct 2019 15:05:07 -0500 Subject: override cert stores Change-Id: I8590b699300f17b25133d691a2aeb3322b75d7ef Issue-ID: POLICY-2064 Signed-off-by: jhh --- .../policy-distribution-docker/src/main/docker/policy-dist.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/policy-distribution-docker/src/main/docker/policy-dist.sh b/packages/policy-distribution-docker/src/main/docker/policy-dist.sh index 3a559f34..33fe3083 100644 --- a/packages/policy-distribution-docker/src/main/docker/policy-dist.sh +++ b/packages/policy-distribution-docker/src/main/docker/policy-dist.sh @@ -26,7 +26,6 @@ KEYSTORE_PASSWD="Pol1cy_0nap" TRUSTSTORE="${POLICY_HOME}/etc/ssl/policy-truststore" TRUSTSTORE_PASSWD="Pol1cy_0nap" - if [ "$#" -eq 1 ]; then CONFIG_FILE=$1 else @@ -38,6 +37,16 @@ if [ -z "$CONFIG_FILE" ] CONFIG_FILE="${POLICY_HOME}/etc/defaultConfig.json" fi +if [[ -f "${POLICY_HOME}"/etc/mounted/policy-truststore ]]; then + echo "overriding policy-truststore" + cp -f "${POLICY_HOME}"/etc/mounted/policy-truststore "${TRUSTSTORE}" +fi + +if [[ -f "${POLICY_HOME}"/etc/mounted/policy-keystore ]]; then + echo "overriding policy-keystore" + cp -f "${POLICY_HOME}"/etc/mounted/policy-keystore "${KEYSTORE}" +fi + echo "Policy distribution config file: $CONFIG_FILE" $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.distribution.main.startstop.Main -c $CONFIG_FILE -- cgit 1.2.3-korg