-
-
Save anonymous/0c1d9b05b94f3960f058 to your computer and use it in GitHub Desktop.
console.sh
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
#!/bin/sh | |
# | |
# Copyright (c) 1999-2010 Luca Garulli | |
# | |
#set current working directory | |
cd `dirname $0` | |
# 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"` | |
# Only set ORIENTDB_HOME if not already set | |
[ -f "$ORIENTDB_HOME"/lib/orientdb-tools-1.7.4.jar ] || ORIENTDB_HOME=`cd "$PRGDIR/.." ; pwd` | |
export ORIENTDB_HOME | |
# Set JavaHome if it exists | |
if [ -f "${JAVA_HOME}/bin/java" ]; then | |
JAVA=${JAVA_HOME}/bin/java | |
else | |
JAVA=java | |
fi | |
export JAVA | |
ORIENTDB_SETTINGS="-Dcache.level1.enabled=false -Dcache.level2.enabled=false -Djava.util.logging.config.file="$ORIENTDB_HOME/config/orientdb-client-log.properties" -Djava.awt.headless=true" | |
#JAVA_OPTS=-Xmx1024m | |
KEYSTORE=$ORIENTDB_HOME/config/cert/orientdb-console.ks | |
KEYSTORE_PASS=password | |
TRUSTSTORE=$ORIENTDB_HOME/config/cert/orientdb-console.ts | |
TRUSTSTORE_PASS=password | |
SSL_OPTS="-Dclient.ssl.enabled=false -Djavax.net.ssl.keyStore=$KEYSTORE -Djavax.net.ssl.keyStorePassword=$KEYSTORE_PASS -Djavax.net.ssl.trustStore=$TRUSTSTORE -Djavax.net.ssl.trustStorePassword=$TRUSTSTORE_PASS" | |
$JAVA -client $JAVA_OPTS $ORIENTDB_SETTINGS $SSL_OPTS -Dfile.encoding=utf-8 -Dorientdb.build.number="UNKNOWN@r${buildNumber}; 2014-06-23 19:29:10+0200" -cp "$ORIENTDB_HOME/lib/orientdb-tools-1.7.4.jar:$ORIENTDB_HOME/lib/*" com.orientechnologies.orient.graph.console.OGremlinConsole $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment