https certs with aaf+pe containers compatibility
[policy/engine.git] / packages / docker / src / main / docker / do-start.sh
index 47b835a..c655ce9 100644 (file)
@@ -64,9 +64,15 @@ else
 
        . /opt/app/policy/etc/profile.d/env.sh
 
-       # install policy keystore
-       mkdir -p $POLICY_HOME/etc/ssl
-       cp config/policy-keystore $POLICY_HOME/etc/ssl
+       # override the policy keystore and truststore if present
+
+       if [[ -f config/policy-keystore ]]; then
+           cp config/policy-keystore $POLICY_HOME/etc/ssl
+       fi
+
+       if [[ -f config/policy-truststore ]]; then
+           cp -f config/policy-trustore ${POLICY_HOME}/etc/ssl
+       fi
 
        if [[ -f config/$container-tweaks.sh ]] ; then
                # file may not be executable; running it as an