Lines 1-6
Link Here
|
1 |
#!/bin/sh |
1 |
#!/bin/sh |
2 |
#******************************************************************************* |
2 |
#******************************************************************************* |
3 |
# Copyright (c) 2005, 2006 IBM Corporation, Wind River Systems, Inc. and others. |
3 |
# Copyright (c) 2005, 2008 IBM Corporation, Wind River Systems, Inc. and others. |
4 |
# All rights reserved. This program and the accompanying materials |
4 |
# All rights reserved. This program and the accompanying materials |
5 |
# are made available under the terms of the Eclipse Public License v1.0 |
5 |
# are made available under the terms of the Eclipse Public License v1.0 |
6 |
# which accompanies this distribution, and is available at |
6 |
# which accompanies this distribution, and is available at |
Lines 10-22
Link Here
|
10 |
# IBM Corporation - initial API and implementation |
10 |
# IBM Corporation - initial API and implementation |
11 |
# Martin Oberhuber (Wind River) - Fix for solaris (Bourne Shell export statement) |
11 |
# Martin Oberhuber (Wind River) - Fix for solaris (Bourne Shell export statement) |
12 |
# Patrick Juhl - Fix for unix (Parameters for port selection) |
12 |
# Patrick Juhl - Fix for unix (Parameters for port selection) |
|
|
13 |
# David McKnight (IBM) - Fix to handle timeout and clientUserID parameters |
13 |
#******************************************************************************* |
14 |
#******************************************************************************* |
14 |
# Shell script to start an RSE communications server |
15 |
# Shell script to start an RSE communications server |
15 |
# This script will start the datastore server listening on an available socket |
16 |
# This script will start the datastore server listening on an available socket |
16 |
serverpath=.; |
17 |
serverpath=.; |
|
|
18 |
|
17 |
CLASSPATH=.:dstore_extra_server.jar:dstore_core.jar:dstore_miners.jar:clientserver.jar:$CLASSPATH; |
19 |
CLASSPATH=.:dstore_extra_server.jar:dstore_core.jar:dstore_miners.jar:clientserver.jar:$CLASSPATH; |
18 |
export serverpath CLASSPATH |
20 |
export serverpath CLASSPATH |
19 |
if [ $1 ] |
21 |
|
20 |
then java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -Dclient.username=$1 -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $1 & |
22 |
if [ $# -gt 3 ] |
21 |
else java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server 0 60000 & |
23 |
then |
|
|
24 |
echo "Usage: server.sh [port] [timeout] [clientUserID]" |
25 |
exit |
22 |
fi |
26 |
fi |
|
|
27 |
|
28 |
port=0; |
29 |
timeout=60000; |
30 |
clientUserID=$USER; |
31 |
|
32 |
if [ $# -gt 2 ]; then |
33 |
clientUserID=$3 |
34 |
fi |
35 |
if [ $# -gt 1 ]; then |
36 |
timeout=$2 |
37 |
fi |
38 |
if [ $# -gt 0 ]; then |
39 |
port=$1 |
40 |
fi |
41 |
|
42 |
|
43 |
java -DA_PLUGIN_PATH=$serverpath -DDSTORE_TRACING_ON=false -Dclient.username=$clientUserID -DDSTORE_SPIRIT_ON=true org.eclipse.dstore.core.server.Server $port $timeout & |
44 |
|
45 |
|