process cleanup attempt

Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
Travis Glenn Hansen 2021-12-11 17:02:07 -07:00
parent 05540c6f51
commit 25e625ec0a
1 changed files with 2 additions and 10 deletions

View File

@ -4,17 +4,12 @@ set -e
set -x
_term() {
[[ -n "${SUDO_PID}" ]] && sudo kill -- "${SUDO_PID}"
#[[ -n "${SUDO_PID}" ]] && sudo kill -15 "${SUDO_PID}"
[[ -n "${SUDO_PID}" ]] && kill -15 "${SUDO_PID}"
}
trap _term EXIT
#trap 'kill -- -$(ps -o pgid= $PID | grep -o '[0-9]*')' EXIT
#trap 'kill -- -$PGID' EXIT
#trap 'sudo kill -- -$PGID' EXIT
#trap 'sudo kill $(jobs -p)' EXIT
#trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
export PATH="/usr/local/lib/nodejs/bin:${PATH}"
# install deps
npm i
@ -31,6 +26,3 @@ sleep 10
# launch csi-sanity
#sudo -E ci/bin/launch-csi-sanity.sh
# kill all processes of the session
#sudo kill $(ps -s $$ -o pid=) || true