Created
August 13, 2015 22:41
-
-
Save Calpicow/eda8837fd90c5252cff8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| USAGE="Usage: $0 -p <pidfile>" | |
| NEO4J_HOME="`dirname $0`/.." | |
| die() { | |
| echo $1 | |
| exit 1 | |
| } | |
| while getopts “hp:” OPTION; do | |
| case $OPTION in | |
| h) | |
| echo $USAGE | |
| exit 1 | |
| ;; | |
| p) | |
| PID_FILE=$OPTARG | |
| ;; | |
| esac | |
| done | |
| [ -n "$PID_FILE" ] || die "$USAGE" | |
| mkdir -p $NEO4J_HOME/data/graph.db | |
| cd $NEO4J_HOME | |
| CLASSPATH=`find $NEO4J_HOME -name '*.jar' | xargs echo | tr ' ' ':'` | |
| java -cp "${CLASSPATH}" \ | |
| -Dneo4j.home="${NEO4J_HOME}" \ | |
| -Dfile.encoding=UTF-8 \ | |
| -Dorg.neo4j.server.properties=conf/neo4j-server.properties \ | |
| org.neo4j.server.CommunityBootstrapper > /var/log/neo4j/console.log 2>&1 & | |
| echo $! > $PID_FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment