Merge pull request #11 from wiedehopf/master
streamline the configuration file
This commit is contained in:
commit
2f8d41b5bd
2 changed files with 10 additions and 8 deletions
|
|
@ -1,20 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
trap "kill 0" SIGINT
|
||||
trap "kill -2 0" SIGTERM
|
||||
trap "kill 0" INT
|
||||
trap "kill -2 0" TERM
|
||||
|
||||
INPUT_IP=$(echo $INPUT | cut -d: -f1)
|
||||
INPUT_PORT=$(echo $INPUT | cut -d: -f2)
|
||||
SOURCE="--net-connector $INPUT_IP,$INPUT_PORT,beast_in"
|
||||
|
||||
while sleep 5
|
||||
do
|
||||
if ping -q -c 2 -W 5 feed.adsbexchange.com >/dev/null 2>&1
|
||||
then
|
||||
echo Connected to feed.adsbexchange.com:$SERVERPORT
|
||||
echo Connected to feed.adsbexchange.com:30005
|
||||
|
||||
/usr/local/share/feed-adsbx --net --net-only --quiet \
|
||||
--net-beast-reduce-interval 0.5 \
|
||||
$SOURCE $TARGET $NET_OPTIONS
|
||||
--net-beast-reduce-interval $REDUCE_INTERVAL \
|
||||
$TARGET $NET_OPTIONS $SOURCE
|
||||
|
||||
#/usr/bin/socat -u TCP:$INPUT TCP:feed.adsbexchange.com:$SERVERPORT
|
||||
#/usr/bin/socat -u TCP:$INPUT TCP:feed.adsbexchange.com:30005
|
||||
|
||||
echo Disconnected, reconnecting in 30 seconds!
|
||||
else
|
||||
|
|
|
|||
3
setup.sh
3
setup.sh
|
|
@ -285,6 +285,7 @@ fi
|
|||
|
||||
tee /etc/default/adsbexchange > /dev/null <<EOF
|
||||
INPUT="127.0.0.1:30005"
|
||||
REDUCE_INTERVAL="0.5"
|
||||
USER="${NOSPACENAME}_$((RANDOM % 90 + 10))"
|
||||
RECEIVERLATITUDE="$RECEIVERLATITUDE"
|
||||
RECEIVERLONGITUDE="$RECEIVERLONGITUDE"
|
||||
|
|
@ -292,8 +293,6 @@ fi
|
|||
RESULTS="--results beast,connect,localhost:30104 --results basestation,listen,31003"
|
||||
MLATSERVER="feed.adsbexchange.com:31090"
|
||||
INPUT_TYPE="dump1090"
|
||||
SERVERPORT="30005"
|
||||
SOURCE="--net-connector localhost,30005,beast_in"
|
||||
TARGET="--net-connector feed.adsbexchange.com,30005,beast_reduce_out"
|
||||
NET_OPTIONS="--net-heartbeat 60 --net-ro-size 1280 --net-ro-interval 0.2 --net-ro-port 0 --net-sbs-port 0 --net-bi-port 0 --net-bo-port 0 --net-ri-port 0"
|
||||
EOF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue