]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Run spice if run_spice_client is set and box already running
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 1 Aug 2017 13:24:41 +0000 (10:24 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 1 Aug 2017 13:24:41 +0000 (10:24 -0300)
kvmx

diff --git a/kvmx b/kvmx
index 463f892383c8feeeeb3be6e5fa6130d9b5027b20..a670f55696cca3ea86e169d96caea8885c7c8f28 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -250,7 +250,13 @@ function kvmx_up {
     exit
   elif kvmx_running; then
     echo "$BASENAME: guest $VM is already running"
-    exit 1
+
+    if [ "$run_spice_client" == "1" ]; then
+      kvmx spice $VM
+      exit
+    else
+      exit 1
+    fi
   fi
 
   if [ ! -z "$shared_folder" ]; then