diff options
Diffstat (limited to 'src/main/bin/start.sh')
-rw-r--r-- | src/main/bin/start.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/bin/start.sh b/src/main/bin/start.sh index fecadcc..a54059b 100644 --- a/src/main/bin/start.sh +++ b/src/main/bin/start.sh @@ -9,6 +9,26 @@ if [ -z "$CONFIG_HOME" ]; then exit 1 fi +if [ -z "$KEY_STORE_PASSWORD" ]; then + echo "KEY_STORE_PASSWORD must be set in order to start up process" + exit 1 +else + ## Extract java jar to DEOBFUSCATE the password. + CURR_D=`pwd` + cd $BASEDIR + jar xf data-router.jar + sudo java -cp ./BOOT-INF/lib/jetty-util-9.4.8.v20171121.jar org.eclipse.jetty.util.security.Password $KEY_STORE_PASSWORD > pass.txt 2>> pass.txt + PASS=`sed "2q;d" pass.txt` + sudo rm pass.txt + cd $CURR_D +fi + +## tomcat_keystore to p12 +keytool -importkeystore -noprompt -deststorepass $PASS -destkeypass $PASS -srckeystore $BASEDIR/config/auth/tomcat_keystore -destkeystore $BASEDIR/config/auth/onap.p12 -deststoretype PKCS12 -srcstorepass $PASS + +## import into cacerts +sudo keytool -importkeystore -noprompt -deststorepass changeit -destkeypass changeit -destkeystore /$JAVA_HOME/jre/lib/security/cacerts -srckeystore $BASEDIR/config/auth/onap.p12 -srcstoretype PKCS12 -srcstorepass $PASS -alias tomcat + PROPS="-DAJSC_HOME=$AJSC_HOME" PROPS="$PROPS -DAJSC_CONF_HOME=$AJSC_CONF_HOME" |