Files
tar1090/getupintheair.sh

23 lines
345 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
2022-03-02 13:51:33 +01:00
instance=""
2021-08-06 14:43:23 +02:00
if [[ -n $3 ]]; then
2022-03-02 13:51:33 +01:00
instance="-$3"
2021-08-06 14:43:23 +02:00
fi
2022-03-02 13:51:33 +01:00
wget -nv -O "/usr/local/share/tar1090/html${instance}/upintheair.json" "http://www.heywhatsthat.com/api/upintheair.json?id=${ID}&refraction=0.25&alts=${ALTS}"
2021-08-06 14:43:23 +02:00