summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Farina <zerochaos@gentoo.org>2019-07-21 21:41:03 -0400
committerRick Farina <zerochaos@gentoo.org>2019-07-21 21:41:03 -0400
commiteadff1810e2702d0b99c91f74c91b81b483dc560 (patch)
tree8872b88db13140da1aade95119574064ccf72643 /net-wireless/rtl-sdr/files
parentnet-wireless/kismet: remove old (diff)
downloadgentoo-eadff1810e2702d0b99c91f74c91b81b483dc560.tar.gz
gentoo-eadff1810e2702d0b99c91f74c91b81b483dc560.tar.bz2
gentoo-eadff1810e2702d0b99c91f74c91b81b483dc560.zip
net-wireless/rtl-sdr: add rtl_tcp openrc support
Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Rick Farina <zerochaos@gentoo.org>
Diffstat (limited to 'net-wireless/rtl-sdr/files')
-rw-r--r--net-wireless/rtl-sdr/files/rtl_tcp.confd4
-rw-r--r--net-wireless/rtl-sdr/files/rtl_tcp.initd18
2 files changed, 22 insertions, 0 deletions
diff --git a/net-wireless/rtl-sdr/files/rtl_tcp.confd b/net-wireless/rtl-sdr/files/rtl_tcp.confd
new file mode 100644
index 000000000000..530e89fc940d
--- /dev/null
+++ b/net-wireless/rtl-sdr/files/rtl_tcp.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/rtl_tcp - configuration file for /etc/init.d/rtl_tcp
+
+# Options to pass to rtl_tcp, see `rtl_tcp -h`
+#RTL_TCP_OPTIONS="-d0"
diff --git a/net-wireless/rtl-sdr/files/rtl_tcp.initd b/net-wireless/rtl-sdr/files/rtl_tcp.initd
new file mode 100644
index 000000000000..2e4d07b8c28a
--- /dev/null
+++ b/net-wireless/rtl-sdr/files/rtl_tcp.initd
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+start() {
+ ebegin "Starting rtl_tcp"
+ start-stop-daemon --start --quiet --pidfile /run/rtl_tcp.pid \
+ --background --make-pidfile --exec /usr/bin/rtl_tcp \
+ -1 /var/log/rtl_tcp.log -2 /var/log/rtl_tcp.log \
+ -- ${RTL_TCP_OPTIONS}
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping rtl_tcp"
+ start-stop-daemon --stop --quiet --pidfile /run/rtl_tcp.pid
+ eend ${?}
+}