Skip to content
Snippets Groups Projects
Commit 7d9616b7 authored by Rodrigo Osorio's avatar Rodrigo Osorio
Browse files

comms/rtl-433: Add rc script

rtl-433 can be started as a daemon process capturing radio messages
and using several backends to store or propagate those messages.
parent 0fb41402
No related branches found
No related tags found
No related merge requests found
PORTNAME= rtl-433
PORTVERSION= 23.11
PORTREVISION= 1
CATEGORIES= comms hamradio
MAINTAINER= rodrigo@FreeBSD.org
......@@ -17,5 +18,9 @@ USES= cmake pkgconfig ssl
USE_GITHUB= yes
GH_ACCOUNT= merbanan
GH_PROJECT= rtl_433
USE_RC_SUBR= rtl_433
post-install:
${INSTALL} ${WRKSRC}/conf/rtl_433.example.conf ${STAGEDIR}${PREFIX}/etc/rtl_433.conf
.include <bsd.port.mk>
#!/bin/sh
# PROVIDE: rtl_433
# REQUIRE: DAEMON NETWORKING
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local, /etc/rc.conf or
# /etc/rc.conf.d/rtl_433 to enable this service:
#
# rtl_433_enable (bool): Set to NO by default.
# Set it to "YES" to enable rtl_433.
# rtl_433_config (str): Set to /usr/local/etc/rtl_433.conf by default.
# Path to configuration file.
# rtl_433_user (str): Set to "root" by default.
# User to run rtl_433
. /etc/rc.subr
name=rtl_433
rcvar=rtl_433_enable
load_rc_config $name
: ${rtl_433_enable:="NO"}
: ${rtl_433_config:="/usr/local/etc/rtl_433.conf"}
: ${rtl_433_user:="root"}
pidfile="/var/run/${name}.pid"
procname="/usr/local/bin/${name}"
command="/usr/sbin/daemon"
command_args="-S -m 3 -s info -l daemon -p ${pidfile} ${procname} -c ${rtl_433_config}"
run_rc_command "$1"
bin/rtl_433
@sample etc/rtl_433.conf etc/rtl_433.conf.sample
@sample etc/rtl_433/CAME-TOP432.conf etc/rtl_433/CAME-TOP432.conf.sample
@sample etc/rtl_433/ContinentalRemote.conf etc/rtl_433/ContinentalRemote.conf.sample
@sample etc/rtl_433/DrivewayAlert.conf etc/rtl_433/DrivewayAlert.conf.sample
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment