#! /bin/sh

DAEMON="/usr/sbin/inputlircd"
NAME="inputlirc"
DESC="inputlirc"

test -x $DAEMON || exit 0

[ -r /etc/default/$NAME ] && . /etc/default/$NAME

case "$1" in
  start)
    echo "Starting $DESC"
    start-stop-daemon --exec $DAEMON --start -- $OPTIONS $EVENTS
  ;;
  stop)
    echo "Stopping $DESC"
    start-stop-daemon --exec $DAEMON --stop
  ;;
  restart|reload|force-reload)
    echo "Restarting $DESC configuration"
    start-stop-daemon --exec $DAEMON --stop 
    start-stop-daemon --exec $DAEMON --start -- $OPTIONS $EVENTS
  ;;
  *)
    echo "Usage: invoke-rc.d $NAME {start|stop|reload|restart|force-reload}"
    exit 1
  ;;
esac

exit 0
