Files
tar1090/getupintheair.sh

23 lines
350 B
Bash
Raw Normal View History

2021-08-06 14:43:23 +02:00
#!/bin/bash
ID="$1"
if [[ -z $1 ]]; then
echo "no ID supplied"
exit
fi
ALTS="12192"
if [[ -n $2 ]]; then
ALTS="$2"
fi
instance=tar1090
if [[ -n $3 ]]; then
instance="tar1090-$3"
fi
wget -nv -O "/usr/local/share/${instance}/html/upintheair.json" "http://www.heywhatsthat.com/api/upintheair.json?id=${ID}&refraction=0.25&alts=${ALTS}"