aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-04-02 08:54:51 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-04-02 08:54:51 -0300
commit8e659f567492fbcb3411ba7b5012ad02728c457f (patch)
tree174daf63f8a6487bf760759caa984ee62a8e6907
parent5305c8486aa39e100bb0d15bf8d6eefdfaef4333 (diff)
downloadkvmx-8e659f567492fbcb3411ba7b5012ad02728c457f.tar.gz
kvmx-8e659f567492fbcb3411ba7b5012ad02728c457f.tar.bz2
Adds kill action
-rwxr-xr-xkvmx8
1 files changed, 8 insertions, 0 deletions
diff --git a/kvmx b/kvmx
index ea21eeb..a723a2d 100755
--- 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