Moving destroyvms function
This commit is contained in:
@ -7,16 +7,6 @@ stopdls() {
|
||||
fi
|
||||
}
|
||||
|
||||
destroyvms() {
|
||||
for host in ${!hosts[*]}; do
|
||||
if test -f $ctxdir/data/$host/pid ; then
|
||||
pid=$(cat $ctxdir/data/$host/pid)
|
||||
pinfo "Cleaning VM $host with PID $pid..."
|
||||
kill $pid && sleep 1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
cleanuppaths() {
|
||||
PATHS="data secrets kubeconfig cache dist"
|
||||
cd $ctxdir
|
||||
@ -29,6 +19,7 @@ cleanuppaths() {
|
||||
}
|
||||
|
||||
cleanupssh() {
|
||||
set -x
|
||||
for host in ${!hosts[*]}; do
|
||||
ssh-keygen -R ${hosts[$host]} &>/dev/null
|
||||
done
|
||||
@ -55,6 +46,6 @@ stopdls
|
||||
declare -A hosts
|
||||
get_hosts
|
||||
destroyvms
|
||||
cleanuppaths
|
||||
#cleanuppaths
|
||||
cleanupssh
|
||||
cleanupnetwork
|
||||
#cleanupnetwork
|
||||
|
||||
Reference in New Issue
Block a user