root/helma/helma/branches/jetty6/start.sh

Revision 8604, 2.1 kB (checked in by root, 3 years ago)

robert: removed svn:mime-type and set svn:keywords property of all text files

  • Property svn:eol-style set to native
  • Property cvs2svn:cvs-rev set to 1.2
  • Property svn:executable set to *
  • Property svn:keywords set to Date Revision Author HeadURL Id
Line 
1 #!/bin/sh
2 # Shell script for starting Helma with a JDK-like virtual machine.
3
4 # To add JAR files to the classpath, simply place them into the
5 # lib/ext directory.
6
7 # uncomment to set JAVA_HOME variable
8 # JAVA_HOME=/usr/lib/java
9
10 # uncomment to set HOP_HOME, otherwise we get it from the script path
11 # HOP_HOME=/usr/local/helma
12
13 # options to pass to the Java virtual machine
14 # JAVA_OPTIONS="-server -Xmx128m"
15
16 # Set TCP ports for Helma servers
17 # (comment/uncomment to de/activate)
18 HTTP_PORT=8080
19 # XMLRPC_PORT=8081
20 # AJP13_PORT=8009
21 # RMI_PORT=5050
22
23 ###########################################################
24 ###### No user configuration needed below this line #######
25 ###########################################################
26
27 # if JAVA_HOME variable is set, use it. Otherwise, Java executable
28 # must be contained in PATH variable.
29 if [ "$JAVA_HOME" ]; then
30    JAVACMD="$JAVA_HOME/bin/java"
31    # Check if java command is executable
32    if [ ! -x $JAVACMD ]; then
33       echo "Warning: JAVA_HOME variable may be set incorrectly:"
34       echo "         No executable found at $JAVACMD"
35    fi
36 else
37    JAVACMD=java
38 fi
39
40 # Get the Helma installation directory
41 INSTALL_DIR="${0%/*}"
42 cd $INSTALL_DIR
43 INSTALL_DIR=$PWD
44
45 # get HOP_HOME variable if it isn't set
46 if [ -z "$HOP_HOME" ]; then
47   # try to get HOP_HOME from script file and pwd
48   # strip everyting behind last slash
49   HOP_HOME="${0%/*}"
50   cd $HOP_HOME
51   HOP_HOME=$PWD
52 else
53   cd $HOP_HOME
54 fi
55 echo "Starting Helma in directory $HOP_HOME"
56
57 if [ "$HTTP_PORT" ]; then
58    SWITCHES="$SWITCHES -w $HTTP_PORT"
59    echo Starting HTTP server on port $HTTP_PORT
60 fi
61 if [ "$XMLRPC_PORT" ]; then
62    SWITCHES="$SWITCHES -x $XMLRPC_PORT"
63    echo Starting XML-RPC server on port $XMLRPC_PORT
64 fi
65 if [ "$AJP13_PORT" ]; then
66    SWITCHES="$SWITCHES -jk $AJP13_PORT"
67    echo Starting AJP13 listener on port $AJP13_PORT
68 fi
69 if [ "$RMI_PORT" ]; then
70    SWITCHES="$SWITCHES -p $RMI_PORT"
71    echo Starting RMI server on port $RMI_PORT
72 fi
73 if [ "$HOP_HOME" ]; then
74    SWITCHES="$SWITCHES -h $HOP_HOME"
75 fi
76
77 # Invoke the Java VM
78 $JAVACMD $JAVA_OPTIONS -jar "$INSTALL_DIR/launcher.jar" $SWITCHES
Note: See TracBrowser for help on using the browser.