From 589fdb5e8032cdc7ad52de47e7dc2ccee4b30104 Mon Sep 17 00:00:00 2001 From: Paul Caskey Date: Mon, 15 May 2017 13:38:10 -0500 Subject: [PATCH] bug fixes --- setup-config.sh | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/setup-config.sh b/setup-config.sh index 322aefb..9fdac0f 100755 --- a/setup-config.sh +++ b/setup-config.sh @@ -358,7 +358,7 @@ EOF STOREPWD=$(uuidgen) keytool -genkey -keyalg RSA -alias selfsigned -keystore ssl_keystore.jks -storepass $STOREPWD -validity 360 -keysize 2048 < data.conf >> ${LOGFILE} 2>&1 -cp ssl_keystore.jks ${TOMCERT}/keystore.jks +cp ssl_keystore.jks ..${TOMCERT}/keystore.jks # # OK, next build the shibboleth sealer java keystore @@ -410,9 +410,9 @@ EOF -############################################################ -### make needed adjustments to IdP config and Dockerfile ### -############################################################ +############################################################################## +### make needed adjustments to IdP config and Dockerfile and Tomcat config ### +############################################################################## # #ensure sed command -v sed >/dev/null 2>&1 || { echo >&2 "ERROR: sed is required, but doesn't appear to be installed. Aborting..."; exit 1; } @@ -480,6 +480,20 @@ EOF fi +# configure SSL keystore password in tomcat's config file: +# conf/tomcat/server.xml replace: keystorePass="password" +# +echo "Updating Tomcat's server.xml with the generated password" + +if test \! -f ${TOMCFG}/server.xml.dist; then + cp ${TOMCFG}/server.xml ${TOMCFG}/server.xml.dist +fi +sed "s#keystorePass=\"password\"#keystorePass=\"${STOREPWD}\"#" ${TOMCFG}/server.xml.dist > ${TOMCFG}/server.xml + + + + + ############################################################################################################################ ### notify user of next steps (docker build and docker run commands, based on burn/mount and chosen directory locations) ### ############################################################################################################################ @@ -519,7 +533,7 @@ else echo "Since you have elected to use a mounted config, the steps for " echo " you to build and run a TIER Shibboleth-IdP container are below." echo "BUILD" - echo " You can build an image for a mounted config quite cimply using a command like this:" + echo " You can build an image for a mounted config quite simply using a command like this:" echo " (optionally substitute any tag name (after -t) that is appropriate) " echo "" echo " docker build --rm -t my/shibb-idp-tier ."