diff --git a/remove.sh b/remove.sh new file mode 100644 index 0000000..135140c --- /dev/null +++ b/remove.sh @@ -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 \ No newline at end of file