aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhh <jorge.hernandez-herrero@att.com>2019-10-16 19:36:39 -0500
committerJorge Hernandez <jorge.hernandez-herrero@att.com>2019-10-17 14:00:28 +0000
commit8b597b9a469f968261656eb31f5f3b369a4a75ad (patch)
treeca7c76bc7216a6ae7953e7a96b27d66b78c8b39d
parentc0feaca7b641f6c0e3214f5333a1493c9893e0cb (diff)
override cert stores
Issue-ID: POLICY-2064 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I50b0583bfdf940ed1a4d7a7ac511267c715b7223
-rw-r--r--packages/policy-api-docker/src/main/docker/policy-api.sh10
1 files changed, 10 insertions, 0 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 ff7f6b99..e2242dda 100644
--- a/packages/policy-api-docker/src/main/docker/policy-api.sh
+++ b/packages/policy-api-docker/src/main/docker/policy-api.sh
@@ -40,4 +40,14 @@ fi
echo "Policy api config file: $CONFIG_FILE"
+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
+
$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