#!/bin/sh
#
# $FreeBSD: ports/comms/lirc/files/lircd.sh.in,v 1.1 2007/01/19 02:27:23 bland Exp $
#
# 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"}


prefix=/usr/local
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"
