Skip to content

Commit

Permalink
kill jetty parent including child processes
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Schaller committed Sep 16, 2020
1 parent e051a31 commit 805cd6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function err_report() {
function exitTrap() {
if [ -n "${JETTY_PID}" ]; then
echo "$(date +%T) terminating jetty server"
kill "${JETTY_PID}"
pkill -P "${JETTY_PID}"
fi
}

Expand Down Expand Up @@ -74,7 +74,7 @@ function packageJmc() {
echo "$(date +%T) run jetty - logging output to ${jettyLog}"
touch "${jettyLog}" # create file so that it exists already for tail below
mvn jetty:run --log-file "${jettyLog}" &
JETTY_PID=$(ps -o pid= --ppid $!)
JETTY_PID=$!

while [ "$(tail -n 1 "${jettyLog}")" != "[INFO] Started Jetty Server" ]; do
echo "$(date +%T) waiting for jetty server to start"
Expand Down

0 comments on commit 805cd6c

Please sign in to comment.