Created
January 20, 2015 12:21
-
-
Save ninformations/a78bb8f3eb6c1fe4c01e to your computer and use it in GitHub Desktop.
multiple tomcat instance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# resolve links - $0 may be a softlink | |
PRG="$0" | |
while [ -h "$PRG" ]; do | |
ls=`ls -ld "$PRG"` | |
link=`expr "$ls" : '.*-> \(.*\)$'` | |
if expr "$link" : '/.*' > /dev/null; then | |
PRG="$link" | |
else | |
PRG=`dirname "$PRG"`/"$link" | |
fi | |
done | |
# Get standard environment variables | |
PRGDIR=`dirname "$PRG"` | |
export CATALINA_BASE=`cd "$PRGDIR/.." >/dev/null; pwd` | |
echo "setting CATALINA_BASE as: $CATALINA_BASE" | |
# remove dev logs from catalina | |
rm -rf "$CATALINA_BASE/logs/*" | |
# assumes tomcat is just outside the path | |
sh "$CATALINA_BASE/../tomcat/bin/catalina.sh" "$@" |
Author
ninformations
commented
Jan 20, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment