mirror of
https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git
synced 2024-10-16 13:50:46 +00:00
Merge branch 'dev' of https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder into dev
This commit is contained in:
commit
b42283b648
6 changed files with 20 additions and 17 deletions
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
|
@ -58,7 +58,7 @@ jobs:
|
|||
name: Run hadolint against docker files
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.6
|
||||
- uses: actions/checkout@v4.1.7
|
||||
- name: Pull hadolint/hadolint:latest Image
|
||||
run: docker pull hadolint/hadolint:latest
|
||||
- name: Run hadolint against Dockerfiles
|
||||
|
|
2
.github/workflows/on_pr.yml
vendored
2
.github/workflows/on_pr.yml
vendored
|
@ -34,7 +34,7 @@ jobs:
|
|||
name: Run hadolint against docker files
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.6
|
||||
- uses: actions/checkout@v4.1.7
|
||||
- name: Pull hadolint/hadolint:latest Image
|
||||
run: docker pull hadolint/hadolint:latest
|
||||
- name: Run hadolint against Dockerfiles
|
||||
|
|
2
.github/workflows/pre-commit-updates.yaml
vendored
2
.github/workflows/pre-commit-updates.yaml
vendored
|
@ -9,7 +9,7 @@ jobs:
|
|||
update:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.6
|
||||
- uses: actions/checkout@v4.1.7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: vrslev/pre-commit-autoupdate@v1.0.0
|
||||
|
|
|
@ -41,7 +41,7 @@ repos:
|
|||
- id: shellcheck
|
||||
|
||||
- repo: https://github.com/sirosen/check-jsonschema
|
||||
rev: 0.28.4
|
||||
rev: 0.28.5
|
||||
hooks:
|
||||
- id: check-github-actions
|
||||
- id: check-github-workflows
|
||||
|
@ -59,7 +59,7 @@ repos:
|
|||
- id: black
|
||||
|
||||
- repo: https://github.com/pycqa/flake8
|
||||
rev: "7.0.0" # pick a git hash / tag to point to
|
||||
rev: "7.1.0" # pick a git hash / tag to point to
|
||||
hooks:
|
||||
- id: flake8
|
||||
args: ["--extend-ignore=W503,W504,E501"]
|
||||
|
|
|
@ -29,13 +29,13 @@
|
|||
#---------------------------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
AAClientVersion="1.2.0"
|
||||
AAClientVersion="1.1.0-ultrafeeder"
|
||||
argv="${1,,}"
|
||||
if [[ "${argv:0:1}" != "-" ]]; then argv="-$argv"; fi
|
||||
|
||||
while [[ "$argv" == "-" ]]; do
|
||||
echo "AussieADSB registration utility"
|
||||
echo "Visit https://aussieadsb.com for info"
|
||||
echo "Visit http://aussieadsb.com for info"
|
||||
echo
|
||||
echo "Select an option:"
|
||||
echo "(r)egister -- register a new receiver"
|
||||
|
@ -137,12 +137,9 @@ case "$argv" in
|
|||
fi
|
||||
echo "Your receiver is registered! Please add the following to your Ultrafeeder environment parameters in docker-compose.yml:"
|
||||
echo
|
||||
echo "In ULTRAFEEDER_CONFIG, add this line:"
|
||||
echo "In ULTRAFEEDER_CONFIG, please add these lines:"
|
||||
echo " adsb,aussieadsb.com,$port,beast_reduce_plus_out;"
|
||||
echo " mlat,aussieadsb.com,30000;"
|
||||
echo
|
||||
echo "Add the following parameter as well:"
|
||||
echo "- AUSSIEADSB_KEY='$rcvr_token'"
|
||||
echo " mlat,aussieadsb.com,30000,name=$rcvr_token;"
|
||||
echo
|
||||
echo "After adding these, please recreate your Ultrafeeder container to start feeding AussieADSB!"
|
||||
echo
|
||||
|
@ -175,11 +172,11 @@ case "$argv" in
|
|||
read -n 1 -p "Are you sure you want to deregister station \"$rcvr_name\"? (y/N) " yesno
|
||||
echo ""
|
||||
if [[ "$yesno" != "y" ]]; then
|
||||
echo "Aborting deregistration!"
|
||||
echo "Aborting de-registration!"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Deregistering station $rcvr_name with key $AUSSIEADSB_KEY..."
|
||||
echo "De-registering station $rcvr_name with key $AUSSIEADSB_KEY..."
|
||||
response="$(printf '{"ReceiverToken":"%s","ClientVersion":"%s","MessageType":"deregister","Data":"User"}' "$AUSSIEADSB_KEY" "$AAClientVersion" | nc aussieadsb.com 5000)"
|
||||
if [[ "$(jq -r .MessageType <<< "$response" 2>/dev/null)" == "deregisterresponse" ]]; then
|
||||
echo "De-registration complete!"
|
||||
|
@ -207,7 +204,8 @@ case "$argv" in
|
|||
rcvr_name="$(jq -r .Data.Name <<< "$response" 2>/dev/null)"
|
||||
connected="$(jq -r .Data.Connected <<< "$response" 2>/dev/null)"
|
||||
rcvr_ip="$(jq -r .Data.ConnectedIP <<< "$response" 2>/dev/null)"
|
||||
|
||||
port="$(jq -r .Data.Port <<< "$response" 2>/dev/null)"
|
||||
|
||||
if [[ "$msg_type" != "statusresponse" ]] || [[ "$rcvr_name" == "null" ]]; then
|
||||
echo "Cannot find a receiver with Registration Key \"$AUSSIEADSB_KEY\"!"
|
||||
echo "Please check the key and try again!"
|
||||
|
@ -219,7 +217,12 @@ case "$argv" in
|
|||
echo "Registered Receiver Name: $rcvr_name"
|
||||
echo "Connection status: $connected"
|
||||
echo "Public IP address: $rcvr_ip"
|
||||
echo "Server Port to send Beast data to: $port"
|
||||
echo ""
|
||||
echo "In ULTRAFEEDER_CONFIG, please add these lines:"
|
||||
echo " adsb,aussieadsb.com,$port,beast_reduce_plus_out;"
|
||||
echo " mlat,aussieadsb.com,30000,name=$AUSSIEADSB_KEY;"
|
||||
echo
|
||||
exit 0
|
||||
;;
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@ do
|
|||
# If the argument starts with "uuid=", then it must be a UUID, etc.
|
||||
# If the argument isn't any of the above, then it's an "extra argument"
|
||||
|
||||
unset uuid_arg lat_arg lon_arg alt_arg input_connect_arg return_port_arg extra_args
|
||||
unset name_arg uuid_arg lat_arg lon_arg alt_arg input_connect_arg return_port_arg extra_args
|
||||
|
||||
for ((i=2; i<${#params[*]}; i++))
|
||||
do
|
||||
|
@ -234,7 +234,7 @@ do
|
|||
MLAT_PARAM+=(--input-connect "${input_connect_arg:-localhost:30005}")
|
||||
|
||||
if [[ -n "${name_arg}" ]] || [[ -n "${MLAT_USER}" ]]; then
|
||||
MLAT_PARAM+=(--user "${name_arg:-${MLAT_USER}}")
|
||||
MLAT_PARAM+=(--user \""${name_arg:-${MLAT_USER}}"\")
|
||||
else
|
||||
rnd="${RANDOM}"
|
||||
"${s6wrap[@]}" --args echo "WARNING: MLAT_USER is not set - using random number \"${rnd}\" as MLAT_USER"
|
||||
|
|
Loading…
Reference in a new issue