2008-04-24 11:10:23 -04:30
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# /etc/rc.d/lircd: start/stop/restart lirc daemon
|
|
|
|
#
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
|
|
|
/usr/sbin/lircd -p 666 /etc/lircd.conf
|
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
if [ -f /var/run/lircd.pid ]; then
|
2012-03-28 23:38:55 +09:00
|
|
|
kill $(< /var/run/lircd.pid) && rm -f /var/run/lircd.pid
|
2008-04-24 11:10:23 -04:30
|
|
|
else
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
restart)
|
|
|
|
$0 stop
|
|
|
|
$0 start
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 start|stop|restart"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|