403281 jetty.sh waits for started or failure before returning

This commit is contained in:
Greg Wilkins 2013-03-15 08:32:24 +11:00
parent 38d701753c
commit cc34bdc20a
1 changed files with 4 additions and 0 deletions

View File

@ -117,6 +117,10 @@ started()
do
sleep 4
[ -z "$(grep STARTED $1)" ] || return 0
[ -z "$(grep STOPPED $1)" ] || return 1
[ -z "$(grep FAILED $1)" ] || return 1
local PID=$(head -n 1 "$1" 2>/dev/null) || return 1
kill -0 "$PID" 2>/dev/null || return 1
echo -n ". "
done