#!/bin/sh # # irbox: Starts the irbox Ivy agent # # chkconfig: - 98 02 # description: This is a daemon that drives an Irman infra-red device and \ # emits its events on an Ivy bus # processname: irbox # config: /etc/irbox.conf test -f /usr/bin/irbox || exit 0 # See how we were called. case "$1" in start) echo -n "Infra-red Ivy driver... " start-stop-daemon --start --exec /usr/bin/irbox -- -b 143.196.53,143.196.1:2019 & echo "." ;; stop) echo -n "Shutting down Infra-red Ivy driver: " start-stop-daemon --stop --quiet --exec /usr/bin/irbox echo ;; reload) start-stop-daemon --stop --quiet --signal 1 --exec /usr/bin/irbox ;; restart) start-stop-daemon --stop --quiet --exec /usr/bin/irbox start-stop-daemon --start --exec /usr/bin/irbox -- -b 143.196.53,143.196.1:2019 & ;; *) echo "*** Usage: irbox {start|stop|restart|reload}" exit 1 esac exit 0