delete expired VM from stopped notify
This commit is contained in:
parent
49fb992d75
commit
d82c089e72
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue