Skip to content

Commit

Permalink
fix(#169): exit monitor_server when startup completes
Browse files Browse the repository at this point in the history
  • Loading branch information
jannis-baum committed Aug 29, 2024
1 parent 9c5f1ff commit ee5be9d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions viv
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ server_pid=$!

monitor_server() {
while true; do
# server process ended
if ! kill -0 $server_pid 2>/dev/null; then
# check if startup was completed successfully, if so we can exit
test -f "$output" || exit 0
grep --quiet "STARTUP COMPLETE" "$output" && exit 0
# check if startup was completed successfully, if so we can exit
test -f "$output" || exit 0
grep --quiet "STARTUP COMPLETE" "$output" && exit 0

# server process ended otherwise
if ! kill -0 $server_pid 2>/dev/null; then
# if not, the startup failed
print_bug_report
# kill tail from while loop below
Expand Down

0 comments on commit ee5be9d

Please sign in to comment.