diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2013-04-03 20:57:20 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2013-04-03 20:57:20 -0700 |
commit | 368aa83b6ac9a38b9dfd183659b19cc1ba3947b3 (patch) | |
tree | cc74bf019b1ef4f66004cfeea0e15e60802fd156 /scripts | |
parent | 4678933a672ced8f2a9b9bb7b3737dbce0bbd676 (diff) |
Added tomcat-setup target.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/setup-tomcat.sh | 12 |
1 files changed, 7 insertions, 5 deletions
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} |