I am on ubuntu 14.04 server and I am trying to write script for my database. i added this file to /etc/init/neo.conf:

description "neo4j upstart"

start on startup
stop on shutdown

script
  echo $$ > /var/run/neo_start.pid
  exec /home/ubuntu/neo/neo4j-enterprise-2.3.1/bin/neo4j start
end script

pre-start script
  echo "[`date`] Neo4j Starting" >> /var/log/neo.log
end script

pre-stop script
  rm /var/run/neo_start.pid
  echo "[`date`] Neo4j Stopping" >> /var/log/neo.log
end script

sudo service neo start works fine but sudo service neo stop tells me: 'stop: Unknown instance:'.

any ideas? maybe something with the pid?

share|improve this question

Looks like bin/neo4j start creates it's own daemon process that upstart loses sight of. If you use bin/neo4j console upstart will be able to keep track of it like a normal process.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.