kopia lustrzana https://github.com/jprochazka/adsb-receiver
Updated from master branch.
commit
a38ef36bd2
|
|
@ -70,7 +70,7 @@ fi
|
|||
echo -e "\e[95m Installing packages needed to build and fulfill dependencies...\e[97m"
|
||||
echo ""
|
||||
if [[ `uname -m` == "x86_64" ]]; then
|
||||
if [[ `lsb_release -si` == "Debian" ]] && [ $(dpkg --print-foreign-architectures $1 2>/dev/null | grep -c "i386") -eq 0 ]; then
|
||||
if [ $(dpkg --print-foreign-architectures $1 2>/dev/null | grep -c "i386") -eq 0 ]; then
|
||||
echo -e "\e[94m Adding the i386 architecture...\e[97m"
|
||||
sudo dpkg --add-architecture i386
|
||||
echo -e "\e[94m Downloading latest package lists for enabled repositories and PPAs...\e[97m"
|
||||
|
|
@ -104,7 +104,7 @@ if [ ! -d $FR24BUILDDIRECTORY ]; then
|
|||
fi
|
||||
echo -e "\e[94m Entering the Flightradar24 feeder client build directory...\e[97m"
|
||||
cd $FR24BUILDDIRECTORY
|
||||
if [[ `uname -m` == "armv7l" ]] || [[ `uname -m` == "armv6l" ]]; then
|
||||
if [[ `uname -m` == "armv7l" ]] || [[ `uname -m` == "armv6l" ]] || [[ `uname -m` == "aarch64" ]]; then
|
||||
|
||||
## ARM INSTALLATION
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ fi
|
|||
echo -e "\e[95m Installing packages needed to build and fulfill dependencies...\e[97m"
|
||||
echo ""
|
||||
if [[ `uname -m` == "x86_64" ]]; then
|
||||
if [[ `lsb_release -si` == "Debian" ]] && [ $(dpkg --print-foreign-architectures $1 2>/dev/null | grep -c "i386") -eq 0 ]; then
|
||||
if [ $(dpkg --print-foreign-architectures $1 2>/dev/null | grep -c "i386") -eq 0 ]; then
|
||||
echo -e "\e[94m Adding the i386 architecture...\e[97m"
|
||||
sudo dpkg --add-architecture i386
|
||||
echo -e "\e[94m Downloading latest package lists for enabled repositories and PPAs...\e[97m"
|
||||
|
|
@ -114,7 +114,7 @@ echo ""
|
|||
echo -e "\e[94m Entering the Plane Finder ADS-B Client build directory...\e[97m"
|
||||
cd $PLANEFINDERBUILDDIRECTORY
|
||||
# Install the proper package depending on the devices architecture.
|
||||
if [[ `uname -m` == "armv7l" ]] || [[ `uname -m` == "armv6l" ]]; then
|
||||
if [[ `uname -m` == "armv7l" ]] || [[ `uname -m` == "armv6l" ]] || [[ `uname -m` == "aarch64" ]]; then
|
||||
echo -e "\e[94m Installing the Plane Finder ADS-B Client v$PFCLIENTVERSIONARM for ARM devices package...\e[97m"
|
||||
echo ""
|
||||
sudo dpkg -i $PLANEFINDERBUILDDIRECTORY/pfclient_${PFCLIENTVERSIONARM}_armhf.deb
|
||||
|
|
|
|||
|
|
@ -386,6 +386,11 @@ alias.url += (
|
|||
url.redirect += (
|
||||
"^/dump1090$" => "/dump1090/"
|
||||
)
|
||||
# Add CORS header
|
||||
server.modules += ( "mod_setenv" )
|
||||
\$HTTP["url"] =~ "^/dump1090/data/.*\.json$" {
|
||||
setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
sudo tee -a /etc/lighttpd/conf-available/89-adsb-portal.conf > /dev/null <<EOF
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ echo "pi:adsbreceiver" | sudo chpasswd
|
|||
|
||||
## CLEAN UP THE SYSTEM TO MAKE THE IMAGE SMALLER
|
||||
|
||||
echo -e "\e[95m Removing packages whic are no longer needed...\e[97m"
|
||||
echo -e "\e[95m Removing packages which are no longer needed...\e[97m"
|
||||
echo ""
|
||||
sudo apt-get -y clean
|
||||
sudo apt-get -y autoclean
|
||||
|
|
@ -253,7 +253,7 @@ history -c && history -w
|
|||
|
||||
echo ""
|
||||
echo -e "\e[91m Image preparation completed.)\e[39m"
|
||||
echo -e "\e[91m Device will be shut down in 5 seconds.)\e[39m"
|
||||
echo -e "\e[91m Device will be shut down in 5 seconds.\e[39m"
|
||||
echo ""
|
||||
|
||||
sleep 5
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ if __name__ == "__main__":
|
|||
# Switch from physical file location to using urllib2 after the addition of the dump1090-fa option.
|
||||
# dump1090-fa and dump1090-mutability store aircraft.json in difrent locations.
|
||||
# However Lighttpd is set up to serve this file using the same URL no matter which version is installed.
|
||||
response = urllib2.urlopen('http://192.168.254.2/dump1090/data/aircraft.json')
|
||||
response = urllib2.urlopen('http://localhost/dump1090/data/aircraft.json')
|
||||
data = json.load(response)
|
||||
|
||||
processor.processAircraftList(data["aircraft"])
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue