From f865daf106e8ebe86d3b6df289d365c769046914 Mon Sep 17 00:00:00 2001 From: Dmitry Badovsky Date: Wed, 22 Oct 2025 17:04:45 +0000 Subject: [PATCH] Add remove.sh --- remove.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 remove.sh 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