service neo4j-service start/stop script

94 views
Skip to first unread message

Sanjana Senthil

unread,
Jun 16, 2016, 5:01:42 AM6/16/16
to Neo4j
Hi,

     I have installed neo4j on the linux server and it is working fine. I want to create a service for neo4j to start and stop it. 

DESC="Neo4J SERVICE"
NAME=neo4j-service
#DAEMON=

do_start()
{
   echo "starting!";
   ./data/neo4j/bin/neo4j console
}

do_stop()
{
   echo "stopping!"
}


case "$1" in
   start)
     do_start
     ;;
   stop)
     do_stop
     ;;
esac

exit 0

I wanted to go step by step.. I am using Java 8. Right now this is just for starting up the service. If i run this script i get,

starting!
WARNING: Max 1024 open files allowed, minimum of 40 000 recommended. See the Neo4j manual.
Starting Neo4j Server console-mode...
which: no java in (/sbin:/usr/sbin:/bin:/usr/bin)
ERROR: Unable to find java. (Cannot execute )
* Please use Oracle(R) Java(TM) 7 or OpenJDK(TM) to run Neo4j Server.
* Please see http://docs.neo4j.org/ for Neo4j Server installation instructions.

But when i give "./bin/neo4j console" in the putty, it works fine. 

Thanks in advance!!!
Reply all
Reply to author
Forward
0 new messages