summaryrefslogtreecommitdiff
path: root/redhat/irbox.init
diff options
context:
space:
mode:
authorchatty2000-07-13 15:54:09 +0000
committerchatty2000-07-13 15:54:09 +0000
commitd03da3408dfa60d1b30497d650a959019ccb1ae4 (patch)
tree1c8f0a51ffbe60d3ebd01d96e2cfe61ae6639ffa /redhat/irbox.init
parent8c5c9393ef068416ccf03539b38e8adb0b2c824a (diff)
downloadirbox-d03da3408dfa60d1b30497d650a959019ccb1ae4.zip
irbox-d03da3408dfa60d1b30497d650a959019ccb1ae4.tar.gz
irbox-d03da3408dfa60d1b30497d650a959019ccb1ae4.tar.bz2
irbox-d03da3408dfa60d1b30497d650a959019ccb1ae4.tar.xz
First official package of version 1.2
First package in the Ivy distribution irbox.init and irbox.conf have been moved from src to redhat
Diffstat (limited to 'redhat/irbox.init')
-rwxr-xr-xredhat/irbox.init68
1 files changed, 68 insertions, 0 deletions
diff --git a/redhat/irbox.init b/redhat/irbox.init
new file mode 100755
index 0000000..2f96c6f
--- /dev/null
+++ b/redhat/irbox.init
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# irbox: Starts the irbox Ivy agent
+#
+# Version: @(#) /etc/rc.d/init.d/irbox.init 1.0
+#
+# chkconfig: 345 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
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+. /etc/irbox.conf
+
+if [ -z $BUS ]; then
+ busopt=
+else
+ busopt="-b $BUS"
+fi
+
+if [ -z $DEVICE ]; then
+ devopt=
+else
+ devopt="-d $DEVICE"
+fi
+
+if [ -z $APPNAME ]; then
+ appopt=
+else
+ appopt="-n $APPNAME"
+fi
+
+
+
+# See how we were called.
+case "$1" in
+ start)
+ echo -n "Infra-red Ivy driver... "
+ daemon irbox $busopt $devopt $appopt &
+ echo
+ touch /var/lock/subsys/irbox
+ ;;
+ stop)
+ echo -n "Shutting down Infra-red Ivy driver: "
+ killproc irbox
+ rm -f /var/lock/subsys/irbox
+ echo
+ ;;
+ status)
+ status irbox
+ ;;
+ reload)
+ killproc -HUP irbox
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "*** Usage: irbox {start|stop|status|restart¦reload}"
+ exit 1
+esac
+
+exit 0
+