Commit 352c439a authored by Matt Liggett's avatar Matt Liggett

Guard both kill and wait with APISERVER_PID.

parent 146a9e60
...@@ -62,10 +62,11 @@ function startApiServer() { ...@@ -62,10 +62,11 @@ function startApiServer() {
function killApiServer() { function killApiServer() {
kube::log::status "Killing api server" kube::log::status "Killing api server"
[[ -n ${APISERVER_PID-} ]] && kill ${APISERVER_PID} 1>&2 2>/dev/null if [[ -n ${APISERVER_PID-} ]]; then
kill ${APISERVER_PID} 1>&2 2>/dev/null
wait ${APISERVER_PID} || true wait ${APISERVER_PID} || true
kube::log::status "api server exited" kube::log::status "api server exited"
fi
unset APISERVER_PID unset APISERVER_PID
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment