aboutsummaryrefslogtreecommitdiffstats
path: root/comms/lirc/files/lircd.sh.in
blob: a1241894bb37952402fa27ecf36c76fa9a656b82 (plain) (blame)
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
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: lircd
# REQUIRE: DAEMON
#
# Add the following line to /etc/rc.conf to enable lircd:
#
# lircd_enable="YES"
#

. /etc/rc.subr

name="lircd"
rcvar=`set_rcvar`

load_rc_config ${name}
: ${lircd_enable="NO"}
: ${lircd_device="/dev/lirc0"}

procname=%%PREFIX%%/sbin/lircd
pidfile=/var/run/lircd.pid
lircd_config="%%PREFIX%%/etc/lircd.conf"
required_files=${lircd_config}
command="%%PREFIX%%/sbin/lircd"
command_args="-d ${lircd_device} ${lircd_config}"

run_rc_command "$1"