]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Adds kill action
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 2 Apr 2017 11:54:51 +0000 (08:54 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 2 Apr 2017 11:54:51 +0000 (08:54 -0300)
kvmx

diff --git a/kvmx b/kvmx
index ea21eeb67ed7407e3e83d19718e697067ed41ce9..a723a2dbac61a1018f293fee8eebb235c9821049 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -637,6 +637,14 @@ function kvmx_stop {
   fi
 }
 
+# Kill a guest
+function kvmx_kill {
+  if kvmx_running; then
+    PID="`cat $PIDFILE`"
+    kill -9 $PID
+  fi
+}
+
 # Destroy a guest
 function kvmx_destroy {
   kvmx_stop