From 782c364f4dd6af7bfc6501caed18a378f6fe9410 Mon Sep 17 00:00:00 2001 From: Rohan Barar Date: Mon, 1 Jul 2024 16:38:31 +1000 Subject: [PATCH] Improved detection of running VMs. --- bin/winapps | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/winapps b/bin/winapps index fdfc653..2cfe6c4 100755 --- a/bin/winapps +++ b/bin/winapps @@ -65,8 +65,8 @@ if [ -z "$RDP_IP" ]; then echo " sudo usermod -a -G kvm $(whoami)" exit fi - if virsh list | grep -vq RDPWindows; then - echo "RDPWindows is not running, run:" + if ! virsh list --state-running --name | grep -q '^RDPWindows$'; then + echo "RDPWindows is not running. Please run:" echo " virsh start RDPWindows" exit fi