aboutsummaryrefslogtreecommitdiffstats
path: root/dcae-controller-core/dcae-controller-core-utils/src/main/server/bin/setup_https.sh
blob: 65592517302ff40cb27ce898ec33db2b56cef57c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

FILE=$1

JKS=/opt/app/dcae-certificate/keystore.jks
PW=/opt/app/dcae-certificate/.password

sed -i /server.keyStore/d $FILE
sed -i /server.keyManagerPassword/d $FILE

if [ ! -e $JKS ]; then exit; fi
if [ ! -e $PW ]; then exit; fi

echo server.keyStore=$JKS >> $FILE
echo server.keyStorePassword=$(cat $PW)  >> $FILE
echo server.keyManagerPassword=$(cat $PW)  >> $FILE