Updated from master branch.

pull/263/head
Joe Prochazka 2016-10-11 11:14:18 -04:00
commit a38ef36bd2
5 zmienionych plików z 12 dodań i 7 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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

Wyświetl plik

@ -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

Wyświetl plik

@ -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

Wyświetl plik

@ -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"])