mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-26 05:02:18 +00:00
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.
This commit is contained in:
parent
0fb4140258
commit
7d9616b7e4
@ -1,5 +1,6 @@
|
||||
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>
|
||||
|
34
comms/rtl-433/files/rtl_433.in
Executable file
34
comms/rtl-433/files/rtl_433.in
Executable file
@ -0,0 +1,34 @@
|
||||
#!/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"
|
@ -1,4 +1,5 @@
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user