From 1edf211b022d5bd6234d422c3e20d5bd97577688 Mon Sep 17 00:00:00 2001 From: Paul Caskey Date: Fri, 16 Jun 2017 14:15:00 -0500 Subject: [PATCH] bugfixes --- configBuilder.sh | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/configBuilder.sh b/configBuilder.sh index 4465996..9cb1fb8 100755 --- a/configBuilder.sh +++ b/configBuilder.sh @@ -58,15 +58,15 @@ mkdir -p logs/shib-idp # first, check for wget command -v wget >/dev/null 2>&1 || { echo >&2 "ERROR: wget is required, but doesn't appear to be installed. Aborting..."; exit 1; } -wget -q -O ${TMP_DIR_S}.zip ${SHB_CFG_URL} -wget -q -O ${TMP_DIR_T}.zip ${TOM_CFG_URL} +wget -q -O ${TMP_DIR_S}.zip ${SHB_CFG_URL} > /dev/null +wget -q -O ${TMP_DIR_T}.zip ${TOM_CFG_URL} > /dev/null ###################### ### expand to /tmp ### ###################### -unzip -d ${TMP_DIR_S} ${TMP_DIR_S}.zip > /dev/null 2>&1 -unzip -d ${TMP_DIR_T} ${TMP_DIR_T}.zip > /dev/null 2>&1 +unzip -o -d ${TMP_DIR_S} ${TMP_DIR_S}.zip > /dev/null 2>&1 +unzip -o -d ${TMP_DIR_T} ${TMP_DIR_T}.zip > /dev/null 2>&1 ################################################################################ ### cp relevant folders from expanded zip to appropriate locations at $PWD/* ### @@ -387,7 +387,8 @@ ENTITYID=https://${FQDN}/idp/shibboleth/ BASEURL=https://${FQDN} cat > ${SHBMD}/idp-metadata.xml < + + $SCOPE @@ -491,14 +492,19 @@ fi sed "s#keystorePass=\"password\"#keystorePass=\"${STOREPWD}\"#" ${TOMCFG}/server.xml.dist > ${TOMCFG}/server.xml - - +echo "" +echo "Archiving generated config..." +echo "" +#ensure zip +command -v zip >/dev/null 2>&1 || { echo >&2 "ERROR: zip is required, but doesn't appear to be installed. Aborting..."; exit 1; } +FILENAME=./shib-idp-config_`date +%m%d%Y-%H%M%S`.zip +zip -r ${FILENAME} ./* > /dev/null ############################################################################################################################ ### notify user of next steps (docker build and docker run commands, based on burn/mount and chosen directory locations) ### ############################################################################################################################ echo "" -echo "Your initial configuration has been successfully setup." +echo "Your initial configuration has been successfully setup. The entire configuration has been archived to ${PWD}/shib-idp-config_`date +%m%d%Y-%H%M%S`.zip" echo "" echo "" if [ ${BURNMOUNT} == "burn" ]; then @@ -545,7 +551,7 @@ else echo "RUN" echo " For a mounted config, you will need to supply your config locations at run-time, like this (assuming the default locations for the local config)." echo "" - echo " docker run -d --name shib-test1 -p 8443:8443 -v /home/shibboleth/conf/tomcat-test:/usr/local/tomcat/conf \\ + echo " docker run -d --name shib-test1 -p 8443:8443 -v ${PWD}/${TOMCFG}:/usr/local/tomcat/conf \\ -v ${PWD}/${TOMWWWROOT}:/usr/local/tomcat/webapps/ROOT \\ -v ${PWD}/${TOMLOG}:/usr/local/tomcat/logs \\ -v ${PWD}/${TOMCERT}:/opt/certs \\