elasticsearch/elasticsearch — pull request #1883 by sfussenegger (2012-04-24 08:14:02+00:00)
Title: fixed always returning 1 if launching in background without pidpath

Currently, the returned value depends on this line:

[ ! -z "$pidpath" ] && printf '%d' $! > "$pidpath"

rather than

exec "$JAVA" ...

which is just before. This certainly isn't intended as a successful start (script returning 0) shouldn't depend on the creation of a PID file.