Last active
December 16, 2015 20:59
-
-
Save leppert/5496204 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 ba528a8..3a133fa 100644 | |
--- 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.4.0-SNAPSHOT.jar ] || ORIENTDB_HOME=`cd "$PRGDIR/.." ; pwd` | |
+[ -f "$ORIENTDB_HOME"/lib/orientdb-tools-1.4.0-SNAPSHOT.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 100644 | |
--- 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 | |
@@ -42,4 +43,4 @@ else | |
fi | |
# Return the program's exit code | |
-exit $? | |
\ No newline at end of file | |
+exit $? | |
diff --git a/bin/orientdb.sh b/bin/orientdb.sh | |
index e8cc970..0564e97 100644 | |
--- a/bin/orientdb.sh | |
+++ b/bin/orientdb.sh | |
@@ -20,7 +20,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 +32,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