Merge "Revert "basic auth for so-monitoring""
[oom.git] / kubernetes / policy / charts / policy-common / resources / config / scripts / do-start.sh
index defae52..052b6f2 100644 (file)
@@ -42,7 +42,7 @@ if [[ -f /opt/app/policy/etc/build.info ]]; then
        echo "Found existing installation, will not reinstall"
        . /opt/app/policy/etc/profile.d/env.sh
 
-else 
+else
        if [[ -d config ]]; then
                cp config/*.conf .
        fi
@@ -59,9 +59,15 @@ else
        . /opt/app/policy/etc/profile.d/env.sh
 
        # install keystore
-       #changed to use http instead of http, so keystore no longer needed
-       #cp config/policy-keystore.jks $POLICY_HOME/etc/ssl/policy-keystore
-       
+        # 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-truststore $[POLICY_HOME]/etc/ssl
+       fi
+
        if [[ -f config/$container-tweaks.sh ]] ; then
                # file may not be executable; running it as an
                # argument to bash avoids needing execute perms.
@@ -74,7 +80,7 @@ else
                # (which does nothing if the db is already up-to-date)
                dbuser=$(echo $(grep '^JDBC_USER=' base.conf | cut -f2 -d=))
                dbpw=$(echo $(grep '^JDBC_PASSWORD=' base.conf | cut -f2 -d=))
-               db_upgrade_remote.sh $dbuser $dbpw {{.Values.global.mariadb.nameOverride}}
+               db_upgrade_remote.sh $dbuser $dbpw {{.Values.global.mariadb.service.name}}
        fi
 
 fi