mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
Guard both kill and wait with APISERVER_PID.
This commit is contained in:
parent
146a9e6075
commit
352c439a96
@ -62,10 +62,11 @@ function startApiServer() {
|
||||
|
||||
function killApiServer() {
|
||||
kube::log::status "Killing api server"
|
||||
[[ -n ${APISERVER_PID-} ]] && kill ${APISERVER_PID} 1>&2 2>/dev/null
|
||||
|
||||
wait ${APISERVER_PID} || true
|
||||
kube::log::status "api server exited"
|
||||
if [[ -n ${APISERVER_PID-} ]]; then
|
||||
kill ${APISERVER_PID} 1>&2 2>/dev/null
|
||||
wait ${APISERVER_PID} || true
|
||||
kube::log::status "api server exited"
|
||||
fi
|
||||
unset APISERVER_PID
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user