Author: tyrell
Date: Sun May 4 23:59:05 2008
New Revision: 16508
Log:
Adding -run option to the startup shell script. Removing un-necessary printing
of statements to mashup.out and re-directing to /dev/null
Modified:
trunk/mashup/java/modules/distribution/bin/wso2mashup.sh
Modified: trunk/mashup/java/modules/distribution/bin/wso2mashup.sh
==============================================================================
--- trunk/mashup/java/modules/distribution/bin/wso2mashup.sh (original)
+++ trunk/mashup/java/modules/distribution/bin/wso2mashup.sh Sun May 4
23:59:05 2008
@@ -156,6 +156,9 @@
fi
# ----- Process the input command
----------------------------------------------
+
+CMD="--help"
+
for c in $*
do
if [ "$c" = "--debug" ] || [ "$c" = "-debug" ] || [ "$c" = "debug" ]; then
@@ -170,6 +173,15 @@
if [ "$c" = "--start" ] || [ "$c" = "-start" ] || [ "$c" = "start" ]; then
CMD="--start"
fi
+ if [ "$c" = "--run" ] || [ "$c" = "-run" ] || [ "$c" = "run" ]; then
+ CMD="--run"
+ fi
+ if [ "$c" = "--version" ] || [ "$c" = "-version" ] || [ "$c" = "version"
]; then
+ CMD="--version"
+ fi
+ if [ "$c" = "--help" ] || [ "$c" = "-help" ] || [ "$c" = "help" ]; then
+ CMD="--help"
+ fi
done
if [ "$CMD" = "--stop" ]; then
@@ -182,12 +194,21 @@
echo " Starting the WSO2 Mashup Server [EMAIL PROTECTED]@ in debug mode. The
debug port is $PORT."
CMD="debug"
JAVA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=$PORT"
-else
+elif [ "$CMD" = "--run" ]; then
+ echo " Starting the WSO2 Mashup Server [EMAIL PROTECTED]@ (Console Mode)"
+ CMD="run"
+elif [ "$CMD" = "--version" ]; then
+ echo " The WSO2 Mashup Server [EMAIL PROTECTED]@ "
+ exit 0
+elif [ "$CMD" = "--help" ]; then
echo " The parameters you entered are invalid. Valid options are;"
echo " "
- echo " --start Start the WSO2 Mashup Server"
- echo " --debug [port] Start the WSO2 Mashup Server in debug
mode. A port number can be specified optionally."
- echo " --stop Stop the WSO2 Mashup Server"
+ echo " --start Start the WSO2 Mashup Server."
+ echo " --debug [port] Start the WSO2 Mashup Server in debug mode. A port
number can be specified optionally."
+ echo " --run Start the WSO2 Mashup Server in console mode."
+ echo " --stop Stop the WSO2 Mashup Server."
+ echo " --version The version of the WSO2 Mashup Server installed."
+ echo " --help Display this help message."
echo ""
exit 0
fi
@@ -234,19 +255,30 @@
echo " Please check the server's log file for startup status."
if [ "$CMD" = "stop" ]; then
-exec "$JAVACMD" \
-$JAVA_OPTS \
--classpath "$WSO2MASHUP_CLASSPATH" \
--Djava.endorsed.dirs="$WSO2MASHUP_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed"
\
--Dwso2mashup.home="$WSO2MASHUP_HOME" -Dwso2wsas.home="$WSO2MASHUP_HOME"
-Dwso2wsas.server.xml="$WSO2MASHUP_HOME/conf/server.xml" -Dserver.script=$0 \
-org.wso2.wsas.Main stop >> "$WSO2MASHUP_HOME"/logs/mashup.out 2>&1 &
+ exec "$JAVACMD" \
+ $JAVA_OPTS \
+ -classpath "$WSO2MASHUP_CLASSPATH" \
+
-Djava.endorsed.dirs="$WSO2MASHUP_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed"
\
+ -Dwso2mashup.home="$WSO2MASHUP_HOME" -Dwso2wsas.home="$WSO2MASHUP_HOME"
-Dwso2wsas.server.xml="$WSO2MASHUP_HOME/conf/server.xml" -Dserver.script=$0 \
+ org.wso2.wsas.Main stop >> /dev/null 2>&1 &
+else
+if [ "$CMD" = "run" ]; then
+ exec "$JAVACMD" \
+ -server \
+ -Xms128m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=128m \
+ $JAVA_OPTS \
+ -classpath "$WSO2MASHUP_CLASSPATH" \
+
-Djava.endorsed.dirs="$WSO2MASHUP_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed"
\
+ -Dwso2mashup.home="$WSO2MASHUP_HOME" -Dwso2wsas.home="$WSO2MASHUP_HOME"
-Dwso2wsas.server.xml="$WSO2MASHUP_HOME/conf/server.xml" -Dserver.script=$0 \
+ org.wso2.wsas.Main run
else
-exec "$JAVACMD" \
--server \
--Xms128m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=128m \
-$JAVA_OPTS \
--classpath "$WSO2MASHUP_CLASSPATH" \
--Djava.endorsed.dirs="$WSO2MASHUP_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed"
\
--Dwso2mashup.home="$WSO2MASHUP_HOME" -Dwso2wsas.home="$WSO2MASHUP_HOME"
-Dwso2wsas.server.xml="$WSO2MASHUP_HOME/conf/server.xml" -Dserver.script=$0 \
-org.wso2.wsas.Main $CMD >> "$WSO2MASHUP_HOME"/logs/mashup.out 2>&1 &
+ exec "$JAVACMD" \
+ -server \
+ -Xms128m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=128m \
+ $JAVA_OPTS \
+ -classpath "$WSO2MASHUP_CLASSPATH" \
+
-Djava.endorsed.dirs="$WSO2MASHUP_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed"
\
+ -Dwso2mashup.home="$WSO2MASHUP_HOME" -Dwso2wsas.home="$WSO2MASHUP_HOME"
-Dwso2wsas.server.xml="$WSO2MASHUP_HOME/conf/server.xml" -Dserver.script=$0 \
+ org.wso2.wsas.Main $CMD >> /dev/null 2>&1 &
fi
+fi
\ No newline at end of file
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev