From 6a5d2a5b96a5c95d830e18d81c420dc33661678d Mon Sep 17 00:00:00 2001 From: Nuno Goncalves Date: Sun, 9 Aug 2015 11:52:22 +0100 Subject: rtl-ais: bump version, add init script, add uci config Signed-off-by: Nuno Goncalves --- utils/rtl-ais/files/rtl_ais.init | 19 +++++++++++++++++++ utils/rtl-ais/files/uci_rtl_ais | 3 +++ 2 files changed, 22 insertions(+) create mode 100644 utils/rtl-ais/files/rtl_ais.init create mode 100644 utils/rtl-ais/files/uci_rtl_ais (limited to 'utils/rtl-ais/files') diff --git a/utils/rtl-ais/files/rtl_ais.init b/utils/rtl-ais/files/rtl_ais.init new file mode 100644 index 000000000..15269b0a5 --- /dev/null +++ b/utils/rtl-ais/files/rtl_ais.init @@ -0,0 +1,19 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2015 OpenWrt.org + +START=99 + +USE_PROCD=1 +PROG=/usr/bin/rtl_ais + +start_service() { + enabled="$(uci_get rtl_ais @rtl_ais[0] enabled 0)" + ppm="$(uci_get rtl_ais @rtl_ais[0] ppm 0)" + + [ "$enabled" != "1" ] && return + + procd_open_instance + procd_set_param command "$PROG" -p "$ppm" + procd_set_param respawn + procd_close_instance +} diff --git a/utils/rtl-ais/files/uci_rtl_ais b/utils/rtl-ais/files/uci_rtl_ais new file mode 100644 index 000000000..1b5f1ec49 --- /dev/null +++ b/utils/rtl-ais/files/uci_rtl_ais @@ -0,0 +1,3 @@ +config rtl_ais + option enabled 0 + option ppm 0 -- cgit v1.2.3