Skip to content

Commit

Permalink
Merge pull request #16 from docker/noIntermediate
Browse files Browse the repository at this point in the history
bugfixes
  • Loading branch information
pcaskey authored Jun 16, 2017
2 parents 86f84b1 + 1edf211 commit 2571f3e
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions configBuilder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/* ###
Expand Down Expand Up @@ -387,7 +387,8 @@ ENTITYID=https://${FQDN}/idp/shibboleth/
BASEURL=https://${FQDN}

cat > ${SHBMD}/idp-metadata.xml <<EOF
<EntityDescriptor entityID="$ENTITYID" xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<EntityDescriptor entityID="$ENTITYID" xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:shibmd="urn:mace:shibboleth:metadata:1.0" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
<Extensions>
<shibmd:Scope regexp="false">$SCOPE</shibmd:Scope>
</Extensions>
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 \\
Expand Down

0 comments on commit 2571f3e

Please sign in to comment.