From d82c089e721370e0a6896e152a25f2fa75a25b44 Mon Sep 17 00:00:00 2001 From: mischa Date: Mon, 13 Mar 2023 11:44:46 +0100 Subject: [PATCH] delete expired VM from stopped notify --- notify.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/notify.pl b/notify.pl index 033605b..872543a 100755 --- a/notify.pl +++ b/notify.pl @@ -200,6 +200,7 @@ if ($function =~ /notify/) { my @stopped_vms = qx(vmctl show | grep stopped | awk '{print \$9}'); for my $vm_name (sort keys %vms) { if (!grep(/$vm_name/, @stopped_vms)) { delete $vms{$vm_name}; next; } + if ($vms{$vm_name}{'donated'} =~ /expire/) { delete $vms{$vm_name}; next; } } mailout(\%conf, \%vms); } else {