aboutsummaryrefslogtreecommitdiff
path: root/comms/lirc/files/lircd.in
diff options
context:
space:
mode:
Diffstat (limited to 'comms/lirc/files/lircd.in')
-rw-r--r--comms/lirc/files/lircd.in29
1 files changed, 29 insertions, 0 deletions
diff --git a/comms/lirc/files/lircd.in b/comms/lirc/files/lircd.in
new file mode 100644
index 000000000000..ecc2cc83d122
--- /dev/null
+++ b/comms/lirc/files/lircd.in
@@ -0,0 +1,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=lircd_enable
+
+load_rc_config ${name}
+: ${lircd_enable="NO"}
+: ${lircd_device="/dev/lirc0"}
+
+procname=%%PREFIX%%/sbin/lircd
+pidfile=/var/run/lirc/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"