From 7174f651a23659b619769c75318b15e25c3b1422 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Wed, 22 Apr 2015 02:25:35 +0300 Subject: docker: initial commit --- src/local/utils.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/local/utils.sh b/src/local/utils.sh index df5e2fb6..0738498b 100644 --- a/src/local/utils.sh +++ b/src/local/utils.sh @@ -14,14 +14,20 @@ else fi fi -function quit_if_no_neo4j_running () { +function neo4j_running () { if [ `uname` == "Darwin" ]; then neo4j_count=`netstat -na -ptcp 2>/dev/null | grep 7474 | wc -l` else neo4j_count=`netstat -ltnop 2>/dev/null | grep 7474 | wc -l` fi - if [ $neo4j_count == "0" ]; then - echo run neo4j please + [ $neo4j_count -gt "0" ] +} + +function quit_if_no_neo4j_running () { + if neo4j_running ; then + return 0 + else + echo neo4j not running exit 0 fi } -- cgit v1.3.1