Moving destroyvms function
This commit is contained in:
@ -119,3 +119,17 @@ create_kubeconfig() {
|
||||
}
|
||||
|
||||
|
||||
destroyvms() {
|
||||
for host in ${!hosts[*]}; do
|
||||
if test -f $ctxdir/data/$host/pid ; then
|
||||
pid=$(cat $ctxdir/data/$host/pid)
|
||||
if ! test -d /proc/$pid ; then
|
||||
pinfo "VM $host seems not running"
|
||||
else
|
||||
pinfo "Cleaning VM $host with PID $pid..."
|
||||
kill $pid && sleep 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user