thekube/del_project.sh

15 lines
323 B
Bash
Raw Permalink Normal View History

2023-12-19 22:08:03 +00:00
#!/usr/bin/bash
random=$1
lxc project switch $random
2024-01-06 00:51:35 +00:00
container1=`lxc ls | tail -3 | head -1 | awk '{ print $2 }'`
container2=`lxc ls | tail -5 | head -1 | awk '{ print $2 }'`
2023-12-19 22:08:03 +00:00
2024-01-06 00:51:35 +00:00
lxc stop $container1
lxc stop $container2
lxc delete $container1
lxc delete $container2
2023-12-19 22:08:03 +00:00
lxc project delete $random
lxc network delete vn-$random