override cert stores

Change-Id: I8590b699300f17b25133d691a2aeb3322b75d7ef
Issue-ID: POLICY-2064
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
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 3a559f3..33fe308 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 @@
 TRUSTSTORE="${POLICY_HOME}/etc/ssl/policy-truststore"
 TRUSTSTORE_PASSWD="Pol1cy_0nap"
 
-
 if [ "$#" -eq 1 ]; then
     CONFIG_FILE=$1
 else
@@ -38,6 +37,16 @@
     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