Created
February 20, 2013 12:55
-
-
Save hryk/4995349 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
# Ubuntu upstart file at /etc/init/orientdb.conf | |
# description "Orientdb Server" | |
# author "Hiroyuki Nakamura" | |
start on runlevel [2345] | |
stop on runlevel [^2345] | |
# environment variables | |
env ENABLE_ORIENTDB="yes" | |
env JAVA_HOME="/usr/lib/jvm/java-1.6.0-openjdk-i386" | |
env ORIENTDB_HOME="/home/vagrant/orientdb" | |
env ORIENTDB_LOG_CONSOLE_LEVEL=info | |
env ORIENTDB_LOG_FILE_LEVEL=fine | |
env ORIENTDB_SETTINGS=-Dcache.level1.enabled=false | |
env ORIENTDB_JAVA_OPTS=-XX:+HeapDumpOnOutOfMemoryError | |
env ORIENTDB_USER=vagrant | |
script | |
ORIENTDB_CONFIG_FILE=$ORIENTDB_HOME/config/orientdb-server-cofnig.xml | |
ORIENTDB_LOG_CONFIG_FILE=$ORIENTDB_HOME/config/orientdb-server-log.properties | |
ORIENTDB_WWW_PATH=$ORIENTDB_HOME/www | |
if [ -f /etc/default/orientdb ]; then . /etc/default/orientdb; fi | |
export ORIENTDB_HOME; | |
exec start-stop-daemon --start -c $ORIENTDB_USER --exec \ | |
$JAVA_HOME/bin/java -- -server $ORIENTDB_JAVA_OPTS $ORIENTDB_SETTINGS \ | |
-Djava.util.logging.config.file="$ORIENTDB_LOG_CONFIG_FILE" \ | |
-Dorientdb.config.file="$ORIENTDB_CONFIG_FILE" \ | |
-Dorientdb.www.path="$ORIENTDB_WWW_PATH" \ | |
-Dorientdb.build.number="16" \ | |
-cp "$ORIENTDB_HOME/lib/orientdb-server-1.3.0.jar:$ORIENTDB_HOME/lib/*" \ | |
com.orientechnologies.orient.server.OServerMain; | |
end script | |
pre-stop script | |
ORIENTDB_CONFIG_FILE=$ORIENTDB_HOME/config/orientdb-server-cofnig.xml | |
ORIENTDB_LOG_CONFIG_FILE=$ORIENTDB_HOME/config/orientdb-server-log.properties | |
ORIENTDB_WWW_PATH=$ORIENTDB_HOME/www | |
if [ -f /etc/default/orientdb ]; then . /etc/default/orientdb; fi | |
su -c "java -client -Dorientdb.config.file=\"$ORIENTDB_CONFIG_FILE\" \ | |
-cp \"$ORIENTDB_HOME/lib/orientdb-tools-1.3.0.jar:$ORIENTDB_HOME/lib/*\" \ | |
com.orientechnologies.orient.server.OServerShutdownMain $*"; | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment