Skip to content

Commit

Permalink
Issue #7182 having running() delete the state file where it previousl…
Browse files Browse the repository at this point in the history
…y only deleted the pid file. (#7184)

* Issue #7182 changing approach from deleting the state file consistently to simply grep'ing for last line in JETTY_STATE file

Signed-off-by: Ian Rifkin <[email protected]>
  • Loading branch information
ianrifkin authored and joakime committed Oct 6, 2022
1 parent bfadf5e commit f9616fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jetty-home/src/main/resources/bin/jetty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ started()
for ((T = 0; T < $(($3 / 4)); T++))
do
sleep 4
[ -z "$(grep STARTED $1 2>/dev/null)" ] || return 0
[ -z "$(grep STOPPED $1 2>/dev/null)" ] || return 1
[ -z "$(grep FAILED $1 2>/dev/null)" ] || return 1
[ -z "$(tail -1 $1 | grep STARTED 2>/dev/null)" ] || return 0
[ -z "$(tail -1 $1 | grep STOPPED 2>/dev/null)" ] || return 1
[ -z "$(tail -1 $1 | grep FAILED 2>/dev/null)" ] || return 1
local PID=$(cat "$2" 2>/dev/null) || return 1
kill -0 "$PID" 2>/dev/null || return 1
echo -n ". "
Expand Down

0 comments on commit f9616fe

Please sign in to comment.