1ba7e76d57
This package adds the userspace tools and daemons LIRC - Linux remote control [Thomas: - rewrap Config.in help text, lines were too long. And do a bit of rewording also. - remove trailing whitespaces in Config.in. - make sure Config.in is included from package/Config.in, otherwise the package is not visible. - use a full destination path when installing the sysv init script. - add dependency on BR2_USE_MMU, since fork() is used. - fix init script: use -n option to not daemonize since start-stop-daemon is already doing that, use 'mkdir -p' and 'ln -sf' to make the 'start' action re-executable.] Signed-off-by: Rhys Williams <github@wilberforce.co.nz> Reviewed-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
39 lines
567 B
Bash
Executable File
39 lines
567 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Start lirc
|
|
#
|
|
# Support for remotes - Add remotes to /etc/lirc/lircd.conf.d/
|
|
#
|
|
|
|
start() {
|
|
echo -n "Starting lirc: "
|
|
mkdir -p /var/run/lirc
|
|
ln -sf /var/run/lirc/lircd /dev/lircd
|
|
start-stop-daemon -b -S -q -m -p /var/run/lirc.pid --exec /usr/sbin/lircd -- -n -O /etc/lirc/lirc_options.conf
|
|
echo "OK"
|
|
}
|
|
|
|
stop() {
|
|
echo -n "Stopping lirc: "
|
|
start-stop-daemon -K -q -p /var/run/lirc.pid
|
|
echo "OK"
|
|
}
|
|
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
restart|reload)
|
|
stop
|
|
start
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
exit 1
|
|
esac
|
|
|
|
exit $?
|