Merge remote-tracking branch 'origin/master'

This commit is contained in:
fmittag committed 2013-06-18 11:51:11 +02:00
commit afdd9d2153
2 files changed
+47 -5

No files matched your search

+5 -2
View File
@@ -348,7 +348,7 @@ if [[ "$@" == "install" ]] || [[ "$@" == "all" ]]; then
cp -v $PROJECT_HOME/java/target/stop $ACDIR/
fi
if [[ $HAS_OVERWRITTEN_TARGET -eq 0 ]] && [ ! -f $ACDIR/no-overwrite ]; then
if [ ! -f $ACDIR/no-overwrite ]; then
cp -v $p2PluginRepository/configuration/config.ini configuration/
mkdir -p configuration/jetty/etc
@@ -383,7 +383,7 @@ if [[ "$@" == "install" ]] || [[ "$@" == "all" ]]; then
sed -i "s/expedition.udp.port=.*$/expedition.udp.port=$EXPEDITION_PORT/g" $ACDIR/configuration/config.ini
sed -i "s/replication.exchangeName=.*$/replication.exchangeName=$REPLICATION_CHANNEL/g" $ACDIR/configuration/config.ini
echo "I have updated the configuration with the following data:"
echo "I have read the following configuration from $ACDIR/env.sh:"
echo "SERVER_NAME: $SERVER_NAME"
echo "SERVER_PORT: $SERVER_PORT"
echo "MEMORY: $MEMORY"
@@ -393,6 +393,9 @@ if [[ "$@" == "install" ]] || [[ "$@" == "all" ]]; then
echo "REPLICATION_CHANNEL: $REPLICATION_CHANNEL"
echo ""
if [ -f $ACDIR/no-overwrite ]; then
echo "ATTENTION: I found the file $ACDIR/no-overwrite. This means that I did NOT use env.sh from this branch."
fi
echo "Installation complete. You may now start the server using ./start"
fi
+42 -3
View File
@@ -3,8 +3,47 @@
# source variables
. `pwd`/env.sh
# make some checks
JAVA_BINARY=$JAVA_HOME/bin/java
if [[ ! -d "$JAVA_HOME" ]]; then
echo "Could not find $JAVA_BINARY set in env.sh. Trying to find the correct one..."
JAVA_VERSION=$(java -version 2>&1 | sed 's/java version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q')
if [ "$JAVA_VERSION" -lt 17 ]; then
echo "The current Java version ($JAVA_VERSION) does not match the requirements (>= 1.7)."
exit
fi
JAVA_BINARY=`which java`
echo "Using Java from $JAVA_BINARY"
fi
TELNET_ACTIVE=`netstat -tlnp 2>/dev/null | grep ":$SERVER_PORT"`
if [[ $TELNET_ACTIVE != "" ]]; then
echo "There is something already running on port $SERVER_PORT. Perhaps your server that has not been stopped?"
exit
fi
scriptdir=`dirname "$0"`
LIB_DIR=`pwd`/native-libraries
echo Script directory is $scriptdir and LIB_DIR is $LIB_DIR
nohup "$JAVA_HOME/bin/java" -XX:+UseMembar -D$SERVER_NAME -Dcom.sap.sailing.server.name=$SERVER_NAME -Djava.io.tmpdir=`pwd`/tmp -Dfile.encoding=cp1252 -Djetty.home=$scriptdir/configuration/jetty -Djava.util.logging.config.file=$scriptdir/configuration/logging.properties -Djava.library.path=$LIB_DIR -Xmx$MEMORY -jar plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar -console $TELNET_PORT -configuration ./ -clean 2>/dev/null >/dev/null &
echo "Started $SERVER_NAME on port $TELNET_PORT - use telnet localhost $TELNET_PORT to connect to the OSGi console"
echo "Script directory is $scriptdir and LIB_DIR is $LIB_DIR"
nohup $JAVA_BINARY -XX:+UseMembar -D$SERVER_NAME -Dcom.sap.sailing.server.name=$SERVER_NAME -Djava.io.tmpdir=`pwd`/tmp -Dfile.encoding=cp1252 -Djetty.home=$scriptdir/configuration/jetty -Djava.util.logging.config.file=$scriptdir/configuration/logging.properties -Djava.library.path=$LIB_DIR -Xmx$MEMORY -jar plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar -console $TELNET_PORT -configuration ./ -clean 2>/dev/null >/dev/null &
echo "Starting server..."
sleep 2
TELNET_ACTIVE=`netstat -tlnp 2>/dev/null | grep ":$TELNET_PORT"`
if [[ $TELNET_PORT == "" ]] || [[ $TELNET_ACTIVE == "" ]]; then
echo "Something went wrong with startup. Please check the logs..."
exit
fi
echo "Configuration for this server is:"
echo "SERVER_NAME: $SERVER_NAME"
echo "SERVER_PORT: $SERVER_PORT"
echo "MEMORY: $MEMORY"
echo "TELNET_PORT: $TELNET_PORT"
echo "MONGODB_PORT: $MONGODB_PORT"
echo "EXPEDITION_PORT: $EXPEDITION_PORT"
echo "REPLICATION_CHANNEL: $REPLICATION_CHANNEL"
echo "Started $SERVER_NAME - use telnet localhost $TELNET_PORT to connect to the OSGi console. Logs should be found in logs/sailing0.log.0"