diff --git a/distribution/src/main/resources/bin/elasticsearch b/distribution/src/main/resources/bin/elasticsearch index e2da982687a..d0c06be0adc 100755 --- a/distribution/src/main/resources/bin/elasticsearch +++ b/distribution/src/main/resources/bin/elasticsearch @@ -27,7 +27,7 @@ ES_JVM_OPTIONS="$CONF_DIR"/jvm.options ES_JAVA_OPTS="`parse_jvm_options "$ES_JVM_OPTIONS"` $ES_JAVA_OPTS" # manual parsing to find out, if process should be detached -if [ ! `echo $* | grep -E '(^-d |-d$| -d |--daemonize$|--daemonize )'` ]; then +if ! echo $* | grep -E '(^-d |-d$| -d |--daemonize$|--daemonize )' > /dev/null; then exec \ "$JAVA" \ $ES_JAVA_OPTS \