Skip to content

Commit

Permalink
Cleaned scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
lvca committed Nov 20, 2013
1 parent 6d4c26b commit 3171357
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 74 deletions.
63 changes: 31 additions & 32 deletions distributed/script/dserver.bat
Original file line number Diff line number Diff line change
@@ -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%
Expand All @@ -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%
Expand All @@ -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%

Expand Down
75 changes: 43 additions & 32 deletions distributed/script/dserver.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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-@[email protected]:$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-@[email protected]:$ORIENTDB_HOME/lib/*" com.orientechnologies.orient.server.OServerMain
10 changes: 4 additions & 6 deletions server/script/server.bat
Original file line number Diff line number Diff line change
@@ -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 .
Expand Down Expand Up @@ -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
6 changes: 2 additions & 4 deletions server/script/server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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-@[email protected]:$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-@[email protected]:$ORIENTDB_HOME/lib/*" com.orientechnologies.orient.server.OServerMain

0 comments on commit 3171357

Please sign in to comment.