Fix start script issues 28/113628/1
authorDan Timoney <dtimoney@att.com>
Wed, 7 Oct 2020 17:02:25 +0000 (13:02 -0400)
committerDan Timoney <dtimoney@att.com>
Wed, 7 Oct 2020 19:02:42 +0000 (15:02 -0400)
Fix issues in start script

Change-Id: I9f78611d97021c27496c424930f8f0bca83a427c
Issue-ID: SDNC-1371
Signed-off-by: Dan Timoney <dtimoney@att.com>
Former-commit-id: 484471f013194ac337da337bb324475d267a917f

installation/sdnc/src/main/scripts/addA1TrustStore.sh
installation/sdnc/src/main/scripts/startODL.sh

index 4e3fcab..3528ddf 100755 (executable)
@@ -22,7 +22,7 @@ SDNC_STORE_DIR=${SDNC_STORE_DIR:-/opt/onap/sdnc/data/stores}
 A1_TRUSTSTORE=${SDNC_STORE_DIR}/truststore.a1.adapter.jks
 ONAP_TRUSTSTORE=${SDNC_STORE_DIR}/truststoreONAPall.jks
 
-if [ -f ${A1_TRUST_STORE} ]
+if [ -f ${A1_TRUSTSTORE} -a "${A1_TRUSTSTORE_PASSWORD}" != "" ]
 then
   keytool -importkeystore -srckeystore ${A1_TRUSTSTORE} -srcstorepass ${A1_TRUSTSTORE_PASSWORD} -destkeystore ${ONAP_TRUSTSTORE} -deststorepass changeit
 fi
index ea46c2e..818f104 100755 (executable)
@@ -283,6 +283,7 @@ printf "%s\n" "  MY_ODL_CLUSTER=$MY_ODL_CLUSTER"
 printf "%s\n" "  PEER_ODL_CLUSTER=$PEER_ODL_CLUSTER"
 printf "%s\n" "  SDNR_NORTHBOUND=$SDNR_NORTHBOUND"
 printf "%s\n" "  AAF_ENABLED=$SDNC_AAF_ENABLED"
+printf "%s\n" "  OOM_ENABLED=$OOM_ENABLED"
 
 if "$SDNC_AAF_ENABLED"; then
        export SDNC_AAF_STORE_DIR=/opt/app/osaaf/local
@@ -312,7 +313,7 @@ if $SDNRINIT ; then
   fi
 fi
 
-if $OOM_ENABLED; then
+if $OOM_ENABLED; then
 #
 # Wait for database
 #
@@ -332,16 +333,12 @@ fi
 
 if [ ! -f "${SDNC_HOME}"/.installed ]
 then
-  if $OOM_ENABLED; then
+  if $OOM_ENABLED; then
     # for integration testing. In OOM, a separate job takes care of installing it.
     if $SDNC_DB_INIT; then
       printf "Installing SDN-C database\n"
       "${SDNC_HOME}"/bin/installSdncDb.sh
     fi
-    printf "Installing SDN-C keyStore\n"
-    "${SDNC_HOME}"/bin/addSdncKeyStore.sh
-    printf "Installing A1-adapter trustStore\n"
-    "${SDNC_HOME}"/bin/addA1TrustStore.sh
 
     #${CCSDK_HOME}/bin/installOdlHostKey.sh
 
@@ -352,6 +349,11 @@ then
     fi
   fi
 
+  printf "Installing SDN-C keyStore\n"
+  "${SDNC_HOME}"/bin/addSdncKeyStore.sh
+  printf "Installing A1-adapter trustStore\n"
+  "${SDNC_HOME}"/bin/addA1TrustStore.sh
+
   if $SDNRWT ; then install_sdnrwt_features ; fi
   # The enable_odl_cluster call should not be moved above this line as the cleanFeatureBoot will overwrite entries. Ex: odl-jolokia
   if $ENABLE_ODL_CLUSTER ; then enable_odl_cluster ; fi