mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 19:14:30 +04:00
Also adds a simple init script and sample config file. changelog: https://github.com/merbanan/rtl_433/releases/tag/25.02 Signed-off-by: Keith T. Garner <kgarner@kgarner.com>
35 lines
546 B
Bash
Executable File
35 lines
546 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
|
|
START=90
|
|
|
|
USE_PROCD=1
|
|
|
|
PROG=/usr/bin/rtl_433
|
|
|
|
start_service() {
|
|
config_load rtl_433
|
|
|
|
local enabled
|
|
config_get enabled rtl_433 enabled
|
|
[ "$enabled" -gt 0 ] || return
|
|
|
|
local flags
|
|
config_get flags rtl_433 flags
|
|
|
|
procd_open_instance
|
|
config_list_foreach rtl_433 env "procd_append_param env"
|
|
procd_set_param command $PROG $flags
|
|
procd_set_param stdout 1
|
|
procd_set_param stderr 1
|
|
procd_close_instance
|
|
}
|
|
|
|
reload_service() {
|
|
stop
|
|
start
|
|
}
|
|
|
|
restart() {
|
|
reload_service
|
|
}
|