summaryrefslogtreecommitdiffstats
path: root/packages/policy-distribution-docker
diff options
context:
space:
mode:
Diffstat (limited to 'packages/policy-distribution-docker')
-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