summaryrefslogtreecommitdiff
path: root/net-wireless/dump1090/files
diff options
context:
space:
mode:
Diffstat (limited to 'net-wireless/dump1090/files')
-rw-r--r--net-wireless/dump1090/files/dump1090-5.0.confd20
-rw-r--r--net-wireless/dump1090/files/dump1090-5.0.initd15
-rw-r--r--net-wireless/dump1090/files/tmpfilesd-dump1090-5.0.conf4
3 files changed, 39 insertions, 0 deletions
diff --git a/net-wireless/dump1090/files/dump1090-5.0.confd b/net-wireless/dump1090/files/dump1090-5.0.confd
new file mode 100644
index 000000000000..3350294ae8c0
--- /dev/null
+++ b/net-wireless/dump1090/files/dump1090-5.0.confd
@@ -0,0 +1,20 @@
+# These variable names are chose to be as close as possible to the upstream & Debian options.
+RECEIVER_OPTIONS="--device-index 0 --gain -10 --ppm 0"
+DECODER_OPTIONS="--max-range 360 --fix"
+NET_OPTIONS="--net --net-heartbeat 60 --net-ro-size 1300 --net-ro-interval 0.2 --net-ri-port 0 --net-ro-port 30002 --net-sbs-port 30003 --net-bi-port 30004,30104 --net-bo-port 30005"
+JSON_OPTIONS="--json-location-accuracy 1 --write-json /run/dump1090/"
+
+# See README.md for custom wisdom, or use one of the bundled wisdom files
+WISDOM_FILE=
+[ -f /etc/dump1090-fa/wisdom.local ] && WISDOM_FILE=/etc/dump1090-fa/wisdom.local
+
+# Optional, populate these with your location
+#PIAWARE_LAT=
+#PIAWARE_LON=
+# Or populate file /var/cache/piaware/location.env
+[ -f /var/cache/piaware/location.env ] && source /var/cache/piaware/location.env
+
+if [ -n "$PIAWARE_LAT" -a -n "$PIAWARE_LON" ]
+then
+ POSITION="--lat $PIAWARE_LAT --lon $PIAWARE_LON"
+fi
diff --git a/net-wireless/dump1090/files/dump1090-5.0.initd b/net-wireless/dump1090/files/dump1090-5.0.initd
new file mode 100644
index 000000000000..47c2d240bb54
--- /dev/null
+++ b/net-wireless/dump1090/files/dump1090-5.0.initd
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="dump1090"
+description=""
+command=/usr/bin/dump1090
+command_args="$RECEIVER_OPTIONS $DECODER_OPTIONS $NET_OPTIONS $JSON_OPTIONS $POSITION ${WISDOM_FILE:+--wisdom} ${WISDOM_FILE}"
+
+depend() {
+ use rtl_tcp
+}
+pre_start() {
+ mkdir -p /run/dump1090/
+}
diff --git a/net-wireless/dump1090/files/tmpfilesd-dump1090-5.0.conf b/net-wireless/dump1090/files/tmpfilesd-dump1090-5.0.conf
new file mode 100644
index 000000000000..67341178bfe2
--- /dev/null
+++ b/net-wireless/dump1090/files/tmpfilesd-dump1090-5.0.conf
@@ -0,0 +1,4 @@
+# The daemon will write out JSON files for the webserver here
+d /run/dump1090/ 755 root root -
+# The some upstream configs expect it to be in /run/dump1090-fa/
+L /run/dump1090-fa - - - - /run/dump1090/