aboutsummaryrefslogtreecommitdiff
path: root/kvmx-vdagent
blob: d29e2b3c634b7d8ae8c882d089186254a8172551 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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