diff options
| author | Alon Levy <alon@pobox.com> | 2015-04-22 02:25:35 +0300 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-04-22 02:25:35 +0300 |
| commit | 7174f651a23659b619769c75318b15e25c3b1422 (patch) | |
| tree | a3de133a133ae16faacc8895ae49e51487910ed2 /src | |
| parent | 4cdabb5b51065f5130599c513b6ec77368ed89d1 (diff) | |
docker: initial commit
Diffstat (limited to 'src')
| -rw-r--r-- | src/local/utils.sh | 12 |
1 files changed, 9 insertions, 3 deletions
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 } |
