aboutsummaryrefslogtreecommitdiffstats
path: root/packages/policy-distribution-docker/src/main
diff options
context:
space:
mode:
authorjhh <jorge.hernandez-herrero@att.com>2019-10-17 15:05:07 -0500
committerjhh <jorge.hernandez-herrero@att.com>2019-10-17 15:05:07 -0500
commit6e8f86143b8a715aaca42a503362f5b38b2b6eba (patch)
tree9f3b70364ba6cddf5e5f07f42adcbdb1d7b9374f /packages/policy-distribution-docker/src/main
parent6df52982d9e22fc1ff7a56eea8714a2598a51639 (diff)
override cert stores
Change-Id: I8590b699300f17b25133d691a2aeb3322b75d7ef Issue-ID: POLICY-2064 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'packages/policy-distribution-docker/src/main')
-rw-r--r--packages/policy-distribution-docker/src/main/docker/policy-dist.sh11
1 files changed, 10 insertions, 1 deletions
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