summaryrefslogtreecommitdiff
path: root/packages/lirc/files
diff options
context:
space:
mode:
Diffstat (limited to 'packages/lirc/files')
-rw-r--r--packages/lirc/files/lircd.init38
1 files changed, 38 insertions, 0 deletions
diff --git a/packages/lirc/files/lircd.init b/packages/lirc/files/lircd.init
index e69de29bb2..e549b7ede9 100644
--- a/packages/lirc/files/lircd.init
+++ b/packages/lirc/files/lircd.init
@@ -0,0 +1,38 @@
+#! /bin/sh
+#
+# This is an init script for Familiar
+# Copy it to /etc/init.d/lirc and type
+# > update-rc.d lirc defaults 20
+#
+
+
+test -f /usr/sbin/lircd || exit 0
+
+case "$1" in
+ start)
+ echo -n "Starting lirc daemon: lircd"
+ start-stop-daemon --start --quiet --exec /usr/bin/lircd -- --device=/dev/lirc
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping lirc daemon: lircd"
+ start-stop-daemon --stop --quiet --exec /usr/bin/lircd
+ echo "."
+ ;;
+ reload|force-reload)
+ start-stop-daemon --stop --quiet --signal 1 --exec /usr/bin/lircd
+ ;;
+ restart)
+ echo -n "Stopping lirc daemon: lircd"
+ start-stop-daemon --stop --quiet --exec /usr/bin/lircd
+ sleep 1
+ echo -n "Starting lirc daemon: lircd"
+ start-stop-daemon --start --quiet --exec /usr/bin/lircd -- --device=/dev/lirc
+ echo "."
+ ;;
+ *)
+ echo "Usage: /etc/init.d/lircd {start|stop|reload|restart|force-reload}"
+ exit 1
+esac
+
+exit 0