summaryrefslogtreecommitdiff
path: root/packages/lirc/files/lircexec.init
blob: a9724af0fa657c3cbb3c56b16c5aae397d738491 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#! /bin/sh
#
# This is an init script for Familiar
# Copy it to /etc/init.d/lircexecd and type
# > update-rc.d lircexecd defaults 20
# It must be started after lircd (and it does alphabetically :-)
# irexec reads /etc/lircrc by default


test -f /usr/bin/irexec || exit 0

case "$1" in
  start)
    echo -n "Starting lircexec daemon: irexec"
    start-stop-daemon --start --quiet --exec /usr/bin/irexec
    echo "."
    ;;
  stop)
    echo -n "Stopping lircexec daemon: irexec"
    start-stop-daemon --stop --quiet --exec /usr/bin/irexec
    echo "."
    ;;
  restart|force-restart)
    echo -n "Stopping lircexec daemon: irexec"
    start-stop-daemon --stop --quiet --exec /usr/bin/irexec
    sleep 1
    echo -n "Starting lircexec daemon: irexec"
    start-stop-daemon --start --quiet --exec /usr/bin/irexec
    echo "."
    ;;
  *)
    echo "Usage: /etc/init.d/lircexec {start|stop|reload|restart|force-restart}"
    exit 1
esac

exit 0