diff options
author | Ubuntu <dgl@research.att.com> | 2020-03-09 14:11:52 +0000 |
---|---|---|
committer | Ubuntu <dgl@research.att.com> | 2020-03-09 14:12:06 +0000 |
commit | 6725f93b143b262249635130e44ff8cc7fccdc30 (patch) | |
tree | 082788a538cbcbe20fdd6594c792d77bf26f9d65 /dmaap-bc/misc/dmaapbc | |
parent | b4dc85f82a74ac45ec1661d207740409b3d97238 (diff) |
Remove baked in certs and use downloaded certs
Issue-ID: DMAAP-1401
Signed-off-by: Ubuntu <dgl@research.att.com>
Change-Id: I4da88a80a79711d2173fb7814adb9f86e7af8739
Diffstat (limited to 'dmaap-bc/misc/dmaapbc')
-rw-r--r-- | dmaap-bc/misc/dmaapbc | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/dmaap-bc/misc/dmaapbc b/dmaap-bc/misc/dmaapbc index 51aa93a..15f2fd2 100644 --- a/dmaap-bc/misc/dmaapbc +++ b/dmaap-bc/misc/dmaapbc @@ -76,7 +76,7 @@ config() { echo "WARNING: Expected env file $CONTAINER_CONFIG not found. Default behaviors in effect" find $CONTAINER_ROOT -type f else - source $CONTAINER_CONFIG + . $CONTAINER_CONFIG fi if [ "$DMAAPBC_WAIT_TO_EXIT" != "Y" ] @@ -87,8 +87,24 @@ config() { echo "Not creating $APP_ROOT/ok_to_exit" fi - . misc/havecert.tmpl > etc/havecert - chmod +x etc/havecert + #. misc/havecert.tmpl > etc/havecert + #chmod +x etc/havecert + echo Check for certificate + TZ=GMT0 + cd /opt/app/dmaapbc; + KEYSTORE=${DMAAPBC_KSTOREFILE:-etc/keystore} + echo "KEYSTORE=$KEYSTORE" + d=`dirname $KEYSTORE` + ls -l $d + if [ -f ${KEYSTORE} ] + then + echo "Goodness: Found ${KEYSTORE}" + else + EMSG="`date '+%F %T,000'` WARN Certificate file $KEYSTORE is missing" + echo $EMSG + echo $EMSG >>${DMAAPBC_LOGS:-logs}/dmaapbc.log + fi + # These files might be better provided in kubernetes configmaps # so if they are there, use them @@ -113,7 +129,7 @@ start() { cd $APP_ROOT pwd - if etc/havecert + if [ -f "$KEYSTORE" ] then echo >/dev/null else |