Add remove.sh
This commit is contained in:
9
remove.sh
Normal file
9
remove.sh
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
cat ./hosts | while read line
|
||||||
|
do
|
||||||
|
vmnum=$(echo $ip | cut -d '.' -f 3)(echo $ip | cut -d '.' -f 4)
|
||||||
|
echo -n "Stopping VM $vmnum ....."
|
||||||
|
qm stop $vmnum && echo "OK" && qm destroy 150 --purge --destroy-unreferenced-disks 1
|
||||||
|
echo "VM $vmnum destroyed."
|
||||||
|
rm /mnt/pve/syno-tigra/snippets/${vmnum}_user.yaml && echo "Snippet ${vmnum}_user.yaml removed."
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user