-
-
Save asparagui/8056604 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/bin/console.sh b/bin/console.sh | |
index 72a45ca..0730e0f 100755 | |
--- a/bin/console.sh | |
+++ b/bin/console.sh | |
@@ -3,24 +3,10 @@ | |
# Copyright (c) 1999-2010 Luca Garulli | |
# | |
-# resolve links - $0 may be a softlink | |
-PRG="$0" | |
- | |
-while [ -h "$PRG" ]; do | |
- ls=`ls -ld "$PRG"` | |
- link=`expr "$ls" : '.*-> \(.*\)$'` | |
- if expr "$link" : '/.*' > /dev/null; then | |
- PRG="$link" | |
- else | |
- PRG=`dirname "$PRG"`/"$link" | |
- fi | |
-done | |
- | |
-# Get standard environment variables | |
-PRGDIR=`dirname "$PRG"` | |
+ORIENTDB_HOME="YOUR_ORIENTDB_INSTALLATION_PATH" | |
# Only set ORIENTDB_HOME if not already set | |
-[ -f "$ORIENTDB_HOME"/lib/orientdb-tools-1.6.2.jar ] || ORIENTDB_HOME=`cd "$PRGDIR/.." ; pwd` | |
+[ -f "$ORIENTDB_HOME"/lib/orientdb-tools-1.6.2.jar ] || | |
export ORIENTDB_HOME | |
ORIENTDB_SETTINGS="-Dcache.level1.enabled=false -Dcache.level2.enabled=false" | |
diff --git a/bin/gremlin.sh b/bin/gremlin.sh | |
index 1db7161..d13c1b0 100755 | |
--- a/bin/gremlin.sh | |
+++ b/bin/gremlin.sh | |
@@ -5,7 +5,8 @@ case `uname` in | |
CP=$( echo `dirname $0`/../lib/*.jar . | sed 's/ /;/g') | |
;; | |
*) | |
- CP=$( echo `dirname $0`/../lib/*.jar . | sed 's/ /:/g') | |
+ ORIENTDB_DIR="YOUR_ORIENTDB_INSTALLATION_PATH" | |
+ CP=$( echo $ORIENTDB_DIR/lib/*.jar . | sed 's/ /:/g') | |
esac | |
echo $CP | |
diff --git a/bin/orientdb.sh b/bin/orientdb.sh | |
index e8cc970..45040c3 100755 | |
--- a/bin/orientdb.sh | |
+++ b/bin/orientdb.sh | |
@@ -4,7 +4,6 @@ | |
# You have to SET the OrientDB installation directory here | |
ORIENTDB_DIR="YOUR_ORIENTDB_INSTALLATION_PATH" | |
-ORIENTDB_USER="USER_YOU_WANT_ORIENTDB_RUN_WITH" | |
usage() { | |
echo "Usage: `basename $0`: <start|stop|status>" | |
@@ -20,7 +19,7 @@ start() { | |
fi | |
echo "Starting OrientDB server daemon..." | |
cd "$ORIENTDB_DIR/bin" | |
- su -c "cd \"$ORIENTDB_DIR/bin\"; /usr/bin/nohup ./server.sh 1>../log/orientdb.log 2>../log/orientdb.err &" - $ORIENTDB_USER | |
+ /usr/bin/nohup ./server.sh 1>../log/orientdb.log 2>../log/orientdb.err & | |
} | |
stop() { | |
@@ -32,7 +31,7 @@ stop() { | |
fi | |
echo "Stopping OrientDB server daemon..." | |
cd "$ORIENTDB_DIR/bin" | |
- su -c "cd \"$ORIENTDB_DIR/bin\"; /usr/bin/nohup ./shutdown.sh 1>>../log/orientdb.log 2>>../log/orientdb.err &" - $ORIENTDB_USER | |
+ /usr/bin/nohup ./shutdown.sh 1>>../log/orientdb.log 2>>../log/orientdb.err & | |
} | |
status() { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment