Skip to content

Commit

Permalink
Won't kill master if any instance is offline
Browse files Browse the repository at this point in the history
  • Loading branch information
dmontag committed Nov 18, 2011
1 parent 71bbcfe commit f2d8e20
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kill-if-master.sh
Expand Up @@ -2,6 +2,10 @@

SERVER_ID=`cat /opt/neo4j-enterprise-1.5/conf/neo4j.properties | grep server_id | tr '=' ' ' | awk '{print $2}'`

if [ ! -z '`./status.rb | grep "offline"`' ]; then
exit
fi

if [ ! -z '`./status.rb | grep "$SERVER_ID @" | grep master`' ]; then
sleep 10
PID=`cat /opt/neo4j-enterprise-1.5/data/neo4j-service.pid`
Expand Down

0 comments on commit f2d8e20

Please sign in to comment.