wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Decode Tomcat startup.sh script. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Decode Tomcat startup.sh script." Watch "Decode Tomcat startup.sh script." New topic
Author

Decode Tomcat startup.sh script.

Bruce Jin
Ranch Hand

Joined: Sep 20, 2001
Posts: 666
Decode Tomcat startup.sh script.

startup.sh contains these lines. Can anyone help explain what do they do? Thanks!


# 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

PRGDIR=`dirname "$PRG"`
EXECUTABLE=catalina.sh

# Check that target executable exists
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
echo "Cannot find $PRGDIR/$EXECUTABLE"
echo "This file is needed to run this program"
exit 1
fi

exec "$PRGDIR"/"$EXECUTABLE" start "$@"


BJ - SCJP and SCWCD
We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design

Crazy Bikes created by m-Power
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Decode Tomcat startup.sh script.
 
Similar Threads
Multiple instances of Tomcat 6, class loading experiencing problems for each instance
Trouble running tomcat on Ubuntu Linux.
Tomcat fails to restart with "Address already in use" exception
Java and Shell scripts
error starting up 2nd instance of tomcat