From 1cddbe0234efe158b6c05f21d742eb9489887cc4 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 9 Mar 2017 19:04:24 -0300 Subject: Project revamp: full workflow --- kvmx-vdagent | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 kvmx-vdagent (limited to 'kvmx-vdagent') diff --git a/kvmx-vdagent b/kvmx-vdagent new file mode 100755 index 0000000..d29e2b3 --- /dev/null +++ b/kvmx-vdagent @@ -0,0 +1,17 @@ +#!/bin/bash +# +# Restart spice-vdagent inside the guest +# + +# Get instances +instances="`ps -o pid,command -e | grep "spice-vdagent$" | cut -d ' ' -f 2 | xargs`" + +# Kill old instances +for pid in $instances; do + kill -9 $pid &> /dev/null +done + +# Just to make sure we're inside a virtual machine +if which spice-vdagent &> /dev/null ; then + spice-vdagent +fi -- cgit v1.2.3