File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ if [ -n "${neo4jNotRunning}" ]; then
4949 echo " startNeo4j: Starting neo4j-${NEO4J_EDITION} -${NEO4J_VERSION} in ${NEO4J_DIR} "
5050
5151 # Check if there is already a process that listens to the Neo4j HTTP port
52- port_listener_process_id=$( lsof -t -i:" ${NEO4J_HTTP_PORT} " -sTCP:LISTEN )
53- if echo -n " ${port_listener_process_id} " | grep -q " .* " ; then
52+ port_listener_process_id=$( lsof -t -i:" ${NEO4J_HTTP_PORT} " -sTCP:LISTEN || true )
53+ if [ -z " ${port_listener_process_id} " ] ; then
5454 echo " startNeo4j: There is already a process that listens to port ${NEO4J_HTTP_PORT} "
5555 ps -p " ${port_listener_process_id} "
5656 echo " startNeo4j: Use this command to stop it: kill -9 \$ ( lsof -t -i:${NEO4J_HTTP_PORT} -sTCP:LISTEN )"
You can’t perform that action at this time.
0 commit comments