summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfunctions.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/functions.sh b/functions.sh
index b0baf2d..55edfbf 100755
--- a/functions.sh
+++ b/functions.sh
@@ -10,10 +10,10 @@
# Clean up
clean_up() {
- if sudo virsh list --all | grep "${VM_NAME}.*running" ; then
+ if sudo virsh list --all | grep " ${VM_NAME} .*running" ; then
sudo virsh destroy "$VM_NAME"
fi
- if sudo virsh list --all | grep "${VM_NAME}" ; then
+ if sudo virsh list --all | grep " ${VM_NAME} " ; then
sudo virsh undefine "$VM_NAME"
fi
sudo rm -rf "/var/lib/libvirt/images/$VM_NAME"