#!/bin/sh # Starts Irserver to Uinput Bridge. # # description "Irserver to uinput Bridge" # author "Alexander Grothe " DAEMON=/usr/bin/python SCRIPT=/usr/bin/lircd2uinput ARGS='-s /dev/lircd' NAME=lircd2uinput PID_FILE=/var/run/$NAME.pid . /etc/init.d/rc.functions case "$1" in start) echo "Starting $NAME" start-stop-daemon --start --pidfile $PID_FILE --make-pidfile --background --exec $DAEMON $SCRIPT -- $ARGS > /dev/null 2>&1 check_status ;; stop) echo "Stopping $NAME" start-stop-daemon --stop --signal 2 --quiet --pidfile $PID_FILE > /dev/null 2>&1 check_status ;; restart) $0 stop sleep 2 $0 start ;; init) start=1 #after=irserver after=eventlircd ;; *) echo "Usage $0 {start | stop | restart}" >&2 exit 1 esac