mirror of
https://github.com/winapps-org/winapps.git
synced 2025-09-21 08:49:33 +02:00
9
setup.sh
9
setup.sh
@@ -838,16 +838,13 @@ function waCheckVMRunning() {
|
||||
# Print feedback.
|
||||
echo -n "Checking the status of the Windows VM... "
|
||||
|
||||
# Declare variables.
|
||||
local VM_STATE="" # Stores the state of the Windows VM.
|
||||
|
||||
# Obtain VM Status
|
||||
VM_PAUSED=0
|
||||
virsh list --state-paused | grep -wq "$VM_NAME" || VM_PAUSED="$?"
|
||||
virsh list --state-paused --name | grep -Fxq "$VM_NAME" || VM_PAUSED="$?"
|
||||
VM_RUNNING=0
|
||||
virsh list --state-running | grep -wq "$VM_NAME" || VM_RUNNING="$?"
|
||||
virsh list --state-running --name | grep -Fxq "$VM_NAME" || VM_RUNNING="$?"
|
||||
VM_SHUTOFF=0
|
||||
virsh list --state-shutoff | grep -wq "$VM_NAME" || VM_SHUTOFF="$?"
|
||||
virsh list --state-shutoff --name | grep -Fxq "$VM_NAME" || VM_SHUTOFF="$?"
|
||||
|
||||
if [[ $VM_SHUTOFF == "0" ]]; then
|
||||
# Complete the previous line.
|
||||
|
Reference in New Issue
Block a user