thekube/del_project.sh

12 lines
215 B
Bash
Raw Normal View History

2023-12-19 22:08:03 +00:00
#!/usr/bin/bash
random=$1
lxc project switch $random
2023-12-20 19:41:56 +00:00
container=`lxc ls | tail -2 | head -1 | awk '{ print $2 }'`
2023-12-19 22:08:03 +00:00
2023-12-20 19:41:56 +00:00
lxc stop $container
lxc delete $container
2023-12-19 22:08:03 +00:00
lxc project delete $random
lxc network delete vn-$random