summaryrefslogtreecommitdiffstats
path: root/meta/packages/lirc/files/lircexec.init
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/lirc/files/lircexec.init')
-rwxr-xr-xmeta/packages/lirc/files/lircexec.init37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/packages/lirc/files/lircexec.init b/meta/packages/lirc/files/lircexec.init
new file mode 100755
index 0000000000..3a8c1a306e
--- /dev/null
+++ b/meta/packages/lirc/files/lircexec.init
@@ -0,0 +1,37 @@
1#! /bin/sh
2#
3# This is an init script for Familiar
4# Copy it to /etc/init.d/lircexecd and type
5# > update-rc.d lircexecd defaults 20
6# It must be started after lircd (and it does alphabetically :-)
7# irexec reads /etc/lircrc by default
8
9
10test -f /usr/bin/irexec || exit 0
11test -f /etc/lircrc || exit 0
12
13case "$1" in
14 start)
15 echo -n "Starting lircexec daemon: irexec"
16 start-stop-daemon --start --quiet --exec /usr/bin/irexec -- --daemon
17 echo "."
18 ;;
19 stop)
20 echo -n "Stopping lircexec daemon: irexec"
21 start-stop-daemon --stop --quiet --exec /usr/bin/irexec
22 echo "."
23 ;;
24 restart|force-restart)
25 echo -n "Stopping lircexec daemon: irexec"
26 start-stop-daemon --stop --quiet --exec /usr/bin/irexec
27 sleep 1
28 echo -n "Starting lircexec daemon: irexec"
29 start-stop-daemon --start --quiet --exec /usr/bin/irexec -- --daemon
30 echo "."
31 ;;
32 *)
33 echo "Usage: /etc/init.d/lircexec {start|stop|reload|restart|force-restart}"
34 exit 1
35esac
36
37exit 0