From 368aa83b6ac9a38b9dfd183659b19cc1ba3947b3 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Wed, 3 Apr 2013 20:57:20 -0700 Subject: Added tomcat-setup target. --- ant/tomcat-common.xml | 15 ++++++++++++--- scripts/setup-tomcat.sh | 12 +++++++----- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/ant/tomcat-common.xml b/ant/tomcat-common.xml index d349943..dc2ace9 100644 --- a/ant/tomcat-common.xml +++ b/ant/tomcat-common.xml @@ -12,17 +12,17 @@ - + - + + classpathref="catalina-ant-classpath" onerror="report" /> @@ -87,4 +87,13 @@ + + + + + + + diff --git a/scripts/setup-tomcat.sh b/scripts/setup-tomcat.sh index d6137ac..0a21053 100755 --- a/scripts/setup-tomcat.sh +++ b/scripts/setup-tomcat.sh @@ -2,6 +2,8 @@ TOMCAT_VERSION="7.0.39" +PASSWORD=$1 + if [ -e $HOME/opt/tomcat ]; then echo "Tomcat appears to already be installed at $HOME/opt/tomcat. Skipping..." exit 1 @@ -17,8 +19,10 @@ ln -s apache-tomcat-${TOMCAT_VERSION} tomcat # Configure -echo -n "Enter a tomcat password (stored in plaintext): " -read -s PASSWORD +if [ -z "$PASSWORD" ]; then + echo -n "Enter a tomcat password (stored in plaintext): " + read -s PASSWORD +fi rm tomcat/conf/tomcat-users.xml cat > tomcat/conf/tomcat-users.xml << EOF @@ -34,9 +38,7 @@ EOF chmod 600 tomcat/conf/tomcat-users.xml # Create the build.properties for other projects -echo > tomcat/conf/build.properties << EOF - -# From ${HOME}/opt/tomcat/conf/build.properties +cat > tomcat/conf/build.properties << EOF catalina.home=${HOME}/opt/tomcat manager.username=${USER} manager.password=${PASSWORD} -- cgit v1.2.3