aboutsummaryrefslogtreecommitdiffstats
path: root/aai-resources/src/main/scripts/run_DbTestProcessBuilder.sh
diff options
context:
space:
mode:
Diffstat (limited to 'aai-resources/src/main/scripts/run_DbTestProcessBuilder.sh')
-rw-r--r--aai-resources/src/main/scripts/run_DbTestProcessBuilder.sh51
1 files changed, 17 insertions, 34 deletions
diff --git a/aai-resources/src/main/scripts/run_DbTestProcessBuilder.sh b/aai-resources/src/main/scripts/run_DbTestProcessBuilder.sh
index b3a3ac4..6e6ac6f 100644
--- a/aai-resources/src/main/scripts/run_DbTestProcessBuilder.sh
+++ b/aai-resources/src/main/scripts/run_DbTestProcessBuilder.sh
@@ -1,15 +1,16 @@
#!/bin/ksh
-#
+
+###
# ============LICENSE_START=======================================================
# org.onap.aai
# ================================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,39 +18,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# ============LICENSE_END=========================================================
-#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
-#
-
-#
-# This script invokes the dataSnapshot java class passing an option to tell it to take
-# a snapshot of the database and store it as a single-line XML file.
-#
-
-echo
-echo `date` " Starting $0"
-
-
-userid=$( id | cut -f2 -d"(" | cut -f1 -d")" )
-if [ "${userid}" != "aaiadmin" ]; then
- echo "You must be aaiadmin to run $0. The id used $userid."
- exit 1
-fi
-
-. /etc/profile.d/aai.sh
-PROJECT_HOME=/opt/app/aai-resources
+###
-for JAR in `ls $PROJECT_HOME/extJars/*.jar`
-do
- CLASSPATH=$CLASSPATH:$JAR
-done
+COMMON_ENV_PATH=$( cd "$(dirname "$0")" ; pwd -P )
+. ${COMMON_ENV_PATH}/common_functions.sh
-for JAR in `ls $PROJECT_HOME/lib/*.jar`
-do
- CLASSPATH=$CLASSPATH:$JAR
-done
+start_date;
+check_user;
+source_profile;
-$JAVA_HOME/bin/java -classpath $CLASSPATH -Dhttps.protocols=TLSv1.1,TLSv1.2 -DAJSC_HOME=$PROJECT_HOME -Daai.home=$PROJECT_HOME org.onap.aai.util.DbTestProcessBuilder "$@"
+CERTPATH=$PROJECT_HOME/resources/etc/auth/
+KEYNAME=aaiClientPrivateKey.pem
+CERTNAME=aaiClientPublicCert.pem
-echo `date` " Done $0"
+pw=$(execute_spring_jar org.onap.aai.util.AAIConfigCommandLinePropGetter "" "aai.keystore.passwd" 2> /dev/null | tail -1)
+openssl pkcs12 -in ${CERTPATH}/aai-client-cert.p12 -out $CERTPATH$CERTNAME -clcerts -nokeys -passin pass:$pw
+openssl pkcs12 -in ${CERTPATH}/aai-client-cert.p12 -out $CERTPATH$KEYNAME -nocerts -nodes -passin pass:$pw
+end_date;
exit 0