Invert get.sh name check, don't use -v and -q together.

This commit is contained in:
j3s 2020-05-16 16:06:39 -05:00
parent 109e57ffc9
commit 60a8f34a9b
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ if echo "$vmname" | grep -vqE '^(cvm|capsul)-[a-z0-9]{10}$'; then
exit 1
fi
if virsh list --name --all | grep -vqE "^$vmname$" ; then
if ! virsh list --name --all | grep -qE "^$vmname$" ; then
echo "Error: $vmname not found"
exit 1
fi