inspired by hannes' suggestion i tried to improve the start script:

it's now enough to comment/uncomment the port variables to de/activate the corresponding server.
both, setting of the switches and console messages, will be processed only if the corresponding port variable is set.
this is an experimental set-up, will inform mailiing-list for discussion and feedback.
This commit is contained in:
Tobi Schäfer 2002-10-03 16:31:29 +00:00
parent 7472f1ed0c
commit 6cb52547dd

View file

@ -2,25 +2,47 @@
# Shell script for starting Helma with a JDK-like virtual machine.
# Presumes that you have your classpath set.
# set Helma TCP ports
WEB_PORT=8080
XMLRPC_PORT=8081
# Set TCP ports for Helma servers
# (comment/uncomment to de/activate)
HTTP_PORT=8080
#XMLRPC_PORT=8081
#AJP13_PORT=8009
#RMI_PORT=5050
#HOP_HOME=/usr/local/helma
# if JAVA_HOME variable is set, use it. Otherwise, java executable
# if JAVA_HOME variable is set, use it. Otherwise, Java executable
# must be contained in PATH variable.
if [ "$JAVA_HOME" ]; then
JAVACMD="$JAVA_HOME"/bin/java
if [ "$JAVA_HOME" ]; then
JAVACMD="$JAVA_HOME/bin/java"
else
JAVACMD=java
fi
# set classpath
JARS=lib/helma.jar:lib/crimson.jar:lib/village.jar:lib/servlet.jar:lib/jetty.jar
JARS=$JARS:lib/regexp.jar:lib/netcomponents.jar:lib/jimi.jar:lib/apache-dom.jar
JARS=$JARS:lib/mail.jar:lib/activation.jar:lib/mysql.jar:lib/jdom.jar:lib/minml.jar
# Set classpath
JARS=lib/helma.jar:lib/xmlrpc.jar:lib/crimson.jar:lib/village.jar
JARS=$JARS:lib/servlet.jar:lib/regexp.jar:lib/netcomponents.jar
JARS=$JARS:lib/jimi.jar:lib/apache-dom.jar:lib/jdom.jar:lib/mail.jar
JARS=$JARS:lib/activation.jar:lib/mysql.jar:lib/jetty.jar
echo Starting Web server on port $WEB_PORT
echo Starting XML-RPC server on port $XMLRPC_PORT
if [ "$HTTP_PORT" ]; then
SWITCHES="$SWITCHES" -w $HTTP_PORT
echo Starting HTTP server on port $HTTP_PORT
fi
if [ "$XMLRPC_PORT" ]; then
SWITCHES="$SWITCHES" -x $XMLRPC_PORT
echo Starting XML-RPC server on port $XMLRPC_PORT
fi
if [ "$AJP13_PORT" ]; then
SWITCHES="$SWITCHES" -jk $AJP13_PORT
echo Starting AJP13 listener on port $AJP13_PORT
fi
if [ "$RMI_PORT" ]; then
SWITCHES="$SWITCHES" -p $RMI_PORT
echo Starting RMI server on port $RMI_PORT
fi
if [ "$HOP_HOME" ]; then
SWITCHES="$SWITCHES" -h $HOP_HOME
fi
# launch
$JAVACMD -classpath $CLASSPATH:$JARS helma.main.Server -w $WEB_PORT -x $XMLRPC_PORT
# Invoking the Java VM
$JAVACMD -classpath $CLASSPATH:$JARS helma.main.Server $SWITCHES