process cleanup attempt

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

View File

@ -5,7 +5,8 @@ set -x
_term() {
#[[ -n "${SUDO_PID}" ]] && sudo kill -15 "${SUDO_PID}"
[[ -n "${SUDO_PID}" ]] && kill -15 "${SUDO_PID}"
#[[ -n "${SUDO_PID}" ]] && kill -15 "${SUDO_PID}"
[[ -n "${SUDO_PID}" ]] && sudo kill -15 $(pgrep -P "${SUDO_PID}")
}
trap _term EXIT