Created
June 27, 2015 15:07
-
-
Save jexp/2976bca046d93c5b5a04 to your computer and use it in GitHub Desktop.
Script to start Neo4j with custom database, host and port
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/bash | |
echo "Usage bin/neo4j-cli [path/to/db] [host-or-ip] [port]" | |
DIR=${0%%neo4j-cli} | |
DB=${1-data/graph.db} | |
IP=${2-127.0.0.1} | |
PORT=${3-7474} | |
CONFIG=${DIR}../conf/neo4j-server.properties | |
echo "Starting Neo4j with database $DB listening on $IP:$PORT" | |
echo "Updating config: $CONFIG " | |
sed -i -e "s .*org.neo4j.server.database.location=.* org.neo4j.server.database.location=$DB " $CONFIG | |
sed -i -e "s .*org.neo4j.server.webserver.address=.* org.neo4j.server.webserver.address=$IP " $CONFIG | |
sed -i -e "s .*org.neo4j.server.webserver.port=.* org.neo4j.server.webserver.port=$PORT " $CONFIG | |
${DIR}neo4j restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment