3
# spice-vdagent Agent daemon for Spice guests
6
# description: Together with a per X-session agent process the spice agent \
7
# daemon enhances the spice guest user experience with client \
8
# mouse mode, guest <-> client copy and paste support and more.
11
# Provides: spice-vdagent
12
# Required-Start: $local_fs $remote_fs
13
# Required-Stop: $local_fs $remote_fs
16
# Default-Start: 2 3 4 5
18
# Short-Description: Agent daemon for Spice guests
19
# Description: Together with a per X-session agent process the spice agent
20
# daemon enhances the spice guest user experience with client
21
# mouse mode, guest <-> client copy and paste support and more.
25
exec="/usr/sbin/spice-vdagentd"
27
pidfile="/var/run/spice-vdagentd/spice-vdagentd.pid"
28
port="/dev/virtio-ports/com.redhat.spice.0"
30
[ -e /etc/default/$prog ] && . /etc/default/$prog
31
[ ! -d /var/run/spice-vdagentd ] && mkdir -p /var/run/spice-vdagentd
33
. /lib/lsb/init-functions
35
lockfile=/var/lock/$prog
38
[ -x $exec ] || exit 5
39
[ -c $port ] || exit 0
40
modprobe uinput > /dev/null 2>&1
41
# In case the previous running vdagentd crashed
42
rm -f /var/run/spice-vdagentd/spice-vdagent-sock
43
log_daemon_msg "Starting Agent daemon for Spice guests" "spice-vdagent"
44
if start-stop-daemon --start --quiet --oknodo --pidfile $pidfile --exec $exec -- ; then
52
log_daemon_msg "Stopping Agent daemon for Spice guests" "spice-vdagent"
53
if start-stop-daemon --stop --quiet --oknodo --pidfile $pidfile; then
74
status_of_proc -p $pidfile $exec $prog && exit 0 || exit $?
96
condrestart|try-restart)
101
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"