#! /bin/sh # the following is the LSB init header see # http://www.linux-foundation.org/spec//booksets/LSB-Core-generic/LSB-Core-generic.html#INITSCRCOMCONV # ### BEGIN INIT INFO # Provides: rinputd # Required-Start: $network # Required-Stop: # Should-Start: $saslauthd $network # Default-Start: # Default-Stop: 0 6 # Short-Description: rinputd remote input server daemon # Description: Listens for remote input clients that send input events # like key presses or mouse movements. ### END INIT INFO # the following is the chkconfig init header # # rinputd: rinputd remote input server daemon # # chkconfig: - 70 99 # description: Listens for remote input clients that send input events # like key presses or mouse movements. # # Author: Chase Douglas <chasedouglas@gmail.com> # Modified for Fedora by Jarod Wilson <jarod@redhat.com> DESC="Remote Input Daemon" prog=rinputd DAEMON=/usr/sbin/$prog PIDFILE=/var/run/$prog.pid LOCKFILE=/var/lock/subsys/$prog # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 # Read configuration variable file if it is present [ -r /etc/rinput/$prog.conf ] && . /etc/rinput/$prog.conf # Source function library . /etc/init.d/functions # # Function that starts the daemon/service # do_start() { # We have a hard dependency on uinput to deliver events, # so make damned sure the uinput driver is loaded. /sbin/modprobe uinput >/dev/null 2>&1 echo -n $"Starting $DESC: " daemon $prog -q $RINPUTD_ARGS retval=$? if [ $retval -eq 0 ]; then success echo touch $LOCKFILE else failure echo fi return $retval } # # Function that stops the daemon/service # do_stop() { echo -n $"Stopping $DESC: " killproc $prog echo rm -f $LOCKFILE return $? } case "$1" in start) do_start ;; stop) do_stop ;; restart|reload|force-reload) do_stop do_start ;; status) status $prog exit $? ;; *) echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2 exit 2 ;; esac :