3 # spice-vdagentd 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-vdagentd
12 # Required-Start: $local_fs messagebus
13 # Required-Stop: $local_fs messagebus
14 # Should-Start: $local_fs messagebus
15 # Should-Stop: $local_fs messagebus
17 # Default-Stop: 0 1 2 3 4 6
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.
24 # Source function library.
25 . /etc/rc.d/init.d/functions
27 exec="/usr/sbin/spice-vdagentd"
29 port="/dev/virtio-ports/com.redhat.spice.0"
30 pid="/tmp/spice-vdagentd/spice-vdagentd.pid"
32 [ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
34 lockfile=/tmp/spice-vdagentd/lock/subsys/$prog
37 [ -x $exec ] || exit 5
38 [ -c $port ] || exit 0
39 modprobe uinput > /dev/null 2>&1
40 # In case the previous running vdagentd crashed
41 rm -f /tmp/spice-vdagentd/spice-vdagent-sock
42 echo -n $"Starting $prog: "
43 daemon --pidfile $pid $exec $SPICE_VDAGENTD_EXTRA_ARGS
46 [ $retval -eq 0 ] && touch $lockfile
51 echo -n $"Stopping $prog: "
52 killproc -p $pid $prog
55 [ $retval -eq 0 ] && rm -f $lockfile
73 # run checks to determine if the service is running or use generic status
78 rh_status >/dev/null 2>&1
104 condrestart|try-restart)
105 rh_status_q || exit 0
109 echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"