diff --git a/distributed/script/dserver.bat b/distributed/script/dserver.bat index 2eaff15f4d5..29505457778 100644 --- a/distributed/script/dserver.bat +++ b/distributed/script/dserver.bat @@ -1,32 +1,32 @@ @echo off rem -rem Copyright (c) 2009-2012 Luca Garulli @www.orientechnologies.com +rem Copyright (c) 1999-2012 Luca Garulli @www.orientechnologies.com rem -echo . -echo .` ` -echo , `:. -echo `,` ,:` -echo .,. :,, -echo .,, ,,, -echo . .,.::::: ```` -echo ,` .::,,,,::.,,,,,,`;; .: -echo `,. ::,,,,,,,:.,,.` ` .: -echo ,,:,:,,,,,,,,::. ` ` `` .: -echo ,,:.,,,,,,,,,: `::, ,, ::,::` : :,::` :::: -echo ,:,,,,,,,,,,::,: ,, :. : :: : .: -echo :,,,,,,,,,,:,:: ,, : : : : .: -echo ` :,,,,,,,,,,:,::, ,, .:::::::: : : .: -echo `,...,,:,,,,,,,,,: .:,. ,, ,, : : .: -echo .,,,,::,,,,,,,: `: , ,, : ` : : .: -echo ...,::,,,,::.. `: .,, :, : : : .: -echo ,::::,,,. `: ,, ::::: : : .: -echo ,,:` `,,. -echo ,,, .,` -echo ,,. `, D B S E R V E R -echo `` `. -echo `` -echo ` +echo . +echo .` ` +echo , `:. +echo `,` ,:` +echo .,. :,, +echo .,, ,,, +echo . .,.::::: ```` ::::::::: ::::::::: +echo ,` .::,,,,::.,,,,,,`;; .: :::::::::: ::: ::: +echo `,. ::,,,,,,,:.,,.` ` .: ::: ::: ::: ::: +echo ,,:,:,,,,,,,,::. ` ` `` .: ::: ::: ::: ::: +echo ,,:.,,,,,,,,,: `::, ,, ::,::` : :,::` :::: ::: ::: ::: ::: +echo ,:,,,,,,,,,,::,: ,, :. : :: : .: ::: ::: ::::::: +echo :,,,,,,,,,,:,:: ,, : : : : .: ::: ::: ::::::::: +echo ` :,,,,,,,,,,:,::, ,, .:::::::: : : .: ::: ::: ::: ::: +echo `,...,,:,,,,,,,,,: .:,. ,, ,, : : .: ::: ::: ::: ::: +echo .,,,,::,,,,,,,: `: , ,, : ` : : .: ::: ::: ::: ::: +echo ...,::,,,,::.. `: .,, :, : : : .: ::::::::::: ::: ::: +echo ,::::,,,. `: ,, ::::: : : .: ::::::::: :::::::::: +echo ,,:` `,,. +echo ,,, .,` +echo ,,. `, GRAPH DATABASE +echo `` `. DISTRIBUTED +echo `` www.orientdb.org +echo ` rem Guess ORIENTDB_HOME if not defined set CURRENT_DIR=%cd% @@ -41,7 +41,7 @@ set JAVA="%JAVA_HOME%\bin\java" :okJava if not "%ORIENTDB_HOME%" == "" goto gotHome set ORIENTDB_HOME=%CURRENT_DIR% -if exist "%ORIENTDB_HOME%\bin\cserver.bat" goto okHome +if exist "%ORIENTDB_HOME%\bin\server.bat" goto okHome cd .. set ORIENTDB_HOME=%cd% cd %CURRENT_DIR% @@ -63,14 +63,13 @@ shift goto setArgs :doneSetArgs -set CONFIG_FILE=%ORIENTDB_HOME%/config/orientdb-dserver-config.xml + +if NOT exist "%CONFIG_FILE%" set CONFIG_FILE=%ORIENTDB_HOME%/config/orientdb-dserver-config.xml + set LOG_FILE=%ORIENTDB_HOME%/config/orientdb-server-log.properties -set LOG_CONSOLE_LEVEL=info -set LOG_FILE_LEVEL=fine set WWW_PATH=%ORIENTDB_HOME%/www -REM UNCOMMENT BELOW TO DISABLE THE CACHE -set ORIENTDB_SETTINGS=-Dprofiler.enabled=true -Dcache.level1.enabled=false -Dcache.level2.strategy=1 -set JAVA_OPTS_SCRIPT=-XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true +set ORIENTDB_SETTINGS=-Dprofiler.enabled=true -Dcache.level1.enabled=false -Dcache.level2.enabled=false -Dcache.level2.size=0 +set JAVA_OPTS_SCRIPT=-XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF8 call %JAVA% -server %JAVA_OPTS% %JAVA_OPTS_SCRIPT% %ORIENTDB_SETTINGS% -Djava.util.logging.config.file="%LOG_FILE%" -Dorientdb.config.file="%CONFIG_FILE%" -Dorientdb.www.path="%WWW_PATH%" -Dorientdb.build.number="@BUILD@" -cp "%ORIENTDB_HOME%\lib\*;" com.orientechnologies.orient.server.OServerMain %CMD_LINE_ARGS% diff --git a/distributed/script/dserver.sh b/distributed/script/dserver.sh index 77292f58462..108e05e66da 100644 --- a/distributed/script/dserver.sh +++ b/distributed/script/dserver.sh @@ -1,32 +1,34 @@ #!/bin/sh # -# Copyright (c) 2009-2012 Luca Garulli +# Copyright (c) 2009-2013 Luca Garulli # -echo " . " -echo " .\` \` " -echo " , \`:. " -echo " \`,\` ,:\` " -echo " .,. :,, " -echo " .,, ,,, " -echo " . .,.::::: \`\`\`\` " -echo " ,\` .::,,,,::.,,,,,,\`;; .: " -echo " \`,. ::,,,,,,,:.,,.\` \` .: " -echo " ,,:,:,,,,,,,,::. \` \` \`\` .: " -echo " ,,:.,,,,,,,,,: \`::, ,, ::,::\` : :,::\` :::: " -echo " ,:,,,,,,,,,,::,: ,, :. : :: : .: " -echo " :,,,,,,,,,,:,:: ,, : : : : .: " -echo " \` :,,,,,,,,,,:,::, ,, .:::::::: : : .: " -echo " \`,...,,:,,,,,,,,,: .:,. ,, ,, : : .: " -echo " .,,,,::,,,,,,,: \`: , ,, : \` : : .: " -echo " ...,::,,,,::.. \`: .,, :, : : : .: " -echo " ,::::,,,. \`: ,, ::::: : : .: " -echo " ,,:\` \`,,. " -echo " ,,, .,\` " -echo " ,,. \`, S E R V E R " -echo " \`\` \`. " -echo " \`\` " -echo " \` " +echo " . " +echo " .\` \` " +echo " , \`:. " +echo " \`,\` ,:\` " +echo " .,. :,, " +echo " .,, ,,, " +echo " . .,.::::: \`\`\`\` ::::::::: ::::::::: " +echo " ,\` .::,,,,::.,,,,,,\`;; .: :::::::::: ::: ::: " +echo " \`,. ::,,,,,,,:.,,.\` \` .: ::: ::: ::: ::: " +echo " ,,:,:,,,,,,,,::. \` \` \`\` .: ::: ::: ::: ::: " +echo " ,,:.,,,,,,,,,: \`::, ,, ::,::\` : :,::\` :::: ::: ::: ::: ::: " +echo " ,:,,,,,,,,,,::,: ,, :. : :: : .: ::: ::: ::::::: " +echo " :,,,,,,,,,,:,:: ,, : : : : .: ::: ::: ::::::::: " +echo " \` :,,,,,,,,,,:,::, ,, .:::::::: : : .: ::: ::: ::: ::: " +echo " \`,...,,:,,,,,,,,,: .:,. ,, ,, : : .: ::: ::: ::: ::: " +echo " .,,,,::,,,,,,,: \`: , ,, : \` : : .: ::: ::: ::: ::: " +echo " ...,::,,,,::.. \`: .,, :, : : : .: ::::::::::: ::: ::: " +echo " ,::::,,,. \`: ,, ::::: : : .: ::::::::: :::::::::: " +echo " ,,:\` \`,,. " +echo " ,,, .,\` " +echo " ,,. \`, GRAPH DATABASE " +echo " \`\` \`. DISTRIBUTED " +echo " \`\` www.orientdb.org " +echo " \` " + +cd "$(dirname "$0")" # resolve links - $0 may be a softlink PRG="$0" @@ -48,13 +50,22 @@ PRGDIR=`dirname "$PRG"` [ -f "$ORIENTDB_HOME"/bin/orient.sh ] || ORIENTDB_HOME=`cd "$PRGDIR/.." ; pwd` export ORIENTDB_HOME -CONFIG_FILE=$ORIENTDB_HOME/config/orientdb-dserver-config.xml +if [ ! -f "${CONFIG_FILE}" ] +then + CONFIG_FILE=$ORIENTDB_HOME/config/orientdb-dserver-config.xml +fi + +# Set JavaHome if it exists +if [ -f "${JAVA_HOME}/bin/java" ]; then + JAVA=${JAVA_HOME}/bin/java +else + JAVA=java +fi +export JAVA + LOG_FILE=$ORIENTDB_HOME/config/orientdb-server-log.properties -LOG_CONSOLE_LEVEL=info -LOG_FILE_LEVEL=fine WWW_PATH=$ORIENTDB_HOME/www -#UNCOMMENT BELOW TO DISABLE THE CACHE -ORIENTDB_SETTINGS=-Dcache.level1.enabled=false -JAVA_OPTS_SCRIPT="-XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true" +ORIENTDB_SETTINGS="-Dprofiler.enabled=true -Dcache.level1.enabled=false -Dcache.level2.enabled=false" +JAVA_OPTS_SCRIPT="-XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF8" -java -server $JAVA_OPTS $JAVA_OPTS_SCRIPT $ORIENTDB_SETTINGS -Djava.util.logging.config.file="$LOG_FILE" -Dorientdb.config.file="$CONFIG_FILE" -Dorientdb.www.path="$WWW_PATH" -Dorientdb.build.number="@BUILD@" -cp "$ORIENTDB_HOME/lib/orientdb-server-@VERSION@.jar:$ORIENTDB_HOME/lib/*" com.orientechnologies.orient.server.OServerMain +$JAVA -server $JAVA_OPTS $JAVA_OPTS_SCRIPT $ORIENTDB_SETTINGS -Djava.util.logging.config.file="$LOG_FILE" -Dorientdb.config.file="$CONFIG_FILE" -Dorientdb.www.path="$WWW_PATH" -Dorientdb.build.number="@BUILD@" -cp "$ORIENTDB_HOME/lib/orientdb-server-@VERSION@.jar:$ORIENTDB_HOME/lib/*" com.orientechnologies.orient.server.OServerMain diff --git a/server/script/server.bat b/server/script/server.bat index 77382bf64c0..4168f143417 100644 --- a/server/script/server.bat +++ b/server/script/server.bat @@ -1,6 +1,6 @@ @echo off rem -rem Copyright (c) 1999-2012 Luca Garulli @www.orientechnologies.com +rem Copyright (c) 1999-2013 Luca Garulli @www.orientechnologies.com rem echo . @@ -67,12 +67,10 @@ goto setArgs if NOT exist "%CONFIG_FILE%" set CONFIG_FILE=%ORIENTDB_HOME%/config/orientdb-server-config.xml set LOG_FILE=%ORIENTDB_HOME%/config/orientdb-server-log.properties -set LOG_CONSOLE_LEVEL=info -set LOG_FILE_LEVEL=fine set WWW_PATH=%ORIENTDB_HOME%/www set ORIENTDB_SETTINGS=-Dprofiler.enabled=true -Dcache.level1.enabled=false -Dcache.level2.enabled=false -Dcache.level2.size=0 -set JAVA_OPTS_SCRIPT=-XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true +set JAVA_OPTS_SCRIPT=-XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF8 -call %JAVA% -server %JAVA_OPTS% %JAVA_OPTS_SCRIPT% %ORIENTDB_SETTINGS% -Dfile.encoding=UTF8 -Djava.util.logging.config.file="%LOG_FILE%" -Dorientdb.config.file="%CONFIG_FILE%" -Dorientdb.www.path="%WWW_PATH%" -Dorientdb.build.number="@BUILD@" -cp "%ORIENTDB_HOME%\lib\*;" com.orientechnologies.orient.server.OServerMain %CMD_LINE_ARGS% +call %JAVA% -server %JAVA_OPTS% %JAVA_OPTS_SCRIPT% %ORIENTDB_SETTINGS% -Djava.util.logging.config.file="%LOG_FILE%" -Dorientdb.config.file="%CONFIG_FILE%" -Dorientdb.www.path="%WWW_PATH%" -Dorientdb.build.number="@BUILD@" -cp "%ORIENTDB_HOME%\lib\*;" com.orientechnologies.orient.server.OServerMain %CMD_LINE_ARGS% -:end +:end \ No newline at end of file diff --git a/server/script/server.sh b/server/script/server.sh index ae6dc852a2b..e13b73a107b 100644 --- a/server/script/server.sh +++ b/server/script/server.sh @@ -64,10 +64,8 @@ fi export JAVA LOG_FILE=$ORIENTDB_HOME/config/orientdb-server-log.properties -LOG_CONSOLE_LEVEL=info -LOG_FILE_LEVEL=fine WWW_PATH=$ORIENTDB_HOME/www ORIENTDB_SETTINGS="-Dprofiler.enabled=true -Dcache.level1.enabled=false -Dcache.level2.enabled=false" -JAVA_OPTS_SCRIPT="-XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true" +JAVA_OPTS_SCRIPT="-XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF8" -$JAVA -server $JAVA_OPTS $JAVA_OPTS_SCRIPT $ORIENTDB_SETTINGS -Dfile.encoding=UTF8 -Djava.util.logging.config.file="$LOG_FILE" -Dorientdb.config.file="$CONFIG_FILE" -Dorientdb.www.path="$WWW_PATH" -Dorientdb.build.number="@BUILD@" -cp "$ORIENTDB_HOME/lib/orientdb-server-@VERSION@.jar:$ORIENTDB_HOME/lib/*" com.orientechnologies.orient.server.OServerMain +$JAVA -server $JAVA_OPTS $JAVA_OPTS_SCRIPT $ORIENTDB_SETTINGS -Djava.util.logging.config.file="$LOG_FILE" -Dorientdb.config.file="$CONFIG_FILE" -Dorientdb.www.path="$WWW_PATH" -Dorientdb.build.number="@BUILD@" -cp "$ORIENTDB_HOME/lib/orientdb-server-@VERSION@.jar:$ORIENTDB_HOME/lib/*" com.orientechnologies.orient.server.OServerMain