aboutsummaryrefslogtreecommitdiffstats
path: root/packages/policy-distribution-docker/src/main/docker/policy-dist.sh
diff options
context:
space:
mode:
authorjhh <jorge.hernandez-herrero@att.com>2020-08-03 15:23:32 -0500
committerjhh <jorge.hernandez-herrero@att.com>2020-08-03 15:27:15 -0500
commit9ebbb7c1ab287841b41fbebe97ba2ad15af3bdc7 (patch)
treea93f60d9abee4e4366a4e537d06beb592a71821b /packages/policy-distribution-docker/src/main/docker/policy-dist.sh
parentbe3e278f8b097701d5bd7d19a010280de31875de (diff)
environment variables to support cert. store paths
Issue-ID: POLICY-2615 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I5334ef2a928b3c658fcfd05fe2b15f724c1b4ba7 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'packages/policy-distribution-docker/src/main/docker/policy-dist.sh')
-rw-r--r--packages/policy-distribution-docker/src/main/docker/policy-dist.sh14
1 files changed, 8 insertions, 6 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 169bd5f8..73a869bb 100644
--- a/packages/policy-distribution-docker/src/main/docker/policy-dist.sh
+++ b/packages/policy-distribution-docker/src/main/docker/policy-dist.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -x
#
# ============LICENSE_START=======================================================
# Copyright (C) 2018 Ericsson. All rights reserved.
@@ -21,8 +21,10 @@
#
JAVA_HOME=/usr/lib/jvm/java-11-openjdk/
-KEYSTORE="${POLICY_HOME}/etc/ssl/policy-keystore"
-TRUSTSTORE="${POLICY_HOME}/etc/ssl/policy-truststore"
+KEYSTORE="${KEYSTORE:-$POLICY_HOME/etc/ssl/policy-keystore}"
+TRUSTSTORE="${TRUSTSTORE:-$POLICY_HOME/etc/ssl/policy-truststore}"
+KEYSTORE_PASSWD="${KEYSTORE_PASSWD:-Pol1cy_0nap}"
+TRUSTSTORE_PASSWD="${TRUSTSTORE_PASSWD:-Pol1cy_0nap}"
if [ "$#" -eq 1 ]; then
CONFIG_FILE=$1
@@ -37,12 +39,12 @@ fi
if [[ -f "${POLICY_HOME}"/etc/mounted/policy-truststore ]]; then
echo "overriding policy-truststore"
- cp -f "${POLICY_HOME}"/etc/mounted/policy-truststore "${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}"
+ cp -f "${POLICY_HOME}"/etc/mounted/policy-keystore "${KEYSTORE}"
fi
if [[ -f "${POLICY_HOME}"/etc/mounted/logback.xml ]]; then
@@ -52,4 +54,4 @@ fi
echo "Policy distribution config file: $CONFIG_FILE"
-$JAVA_HOME/bin/java -cp "${POLICY_HOME}/etc:${POLICY_HOME}/lib/*" -Dlogback.configurationFile=$POLICY_HOME/etc/logback.xml -Djavax.net.ssl.keyStore="$KEYSTORE" -Djavax.net.ssl.keyStorePassword="${KEYSTORE_PASSWD:-Pol1cy_0nap}" -Djavax.net.ssl.trustStore="$TRUSTSTORE" -Djavax.net.ssl.trustStorePassword="${TRUSTSTORE_PASSWD:-Pol1cy_0nap}" org.onap.policy.distribution.main.startstop.Main -c $CONFIG_FILE
+$JAVA_HOME/bin/java -cp "${POLICY_HOME}/etc:${POLICY_HOME}/lib/*" -Dlogback.configurationFile="${POLICY_HOME}/etc/logback.xml" -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}"