Initial changes for installation on EOSS tracker brick
This commit is contained in:
parent
089684e20f
commit
bdda0dfb7b
|
|
@ -5,7 +5,7 @@ Maintainer: Oliver Jowett <oliver@mutability.co.uk>
|
||||||
Build-Depends: debhelper(>=9), librtlsdr-dev, libusb-1.0-0-dev, pkg-config, dh-systemd, libncurses5-dev, libbladerf-dev
|
Build-Depends: debhelper(>=9), librtlsdr-dev, libusb-1.0-0-dev, pkg-config, dh-systemd, libncurses5-dev, libbladerf-dev
|
||||||
Standards-Version: 3.9.3
|
Standards-Version: 3.9.3
|
||||||
Homepage: http://www.flightaware.com/
|
Homepage: http://www.flightaware.com/
|
||||||
Vcs-Git: https://github.com/flightaware/dump1090.git
|
Vcs-Git: https://github.com/Deatojef/dump1090.git
|
||||||
|
|
||||||
Package: dump1090
|
Package: dump1090
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
@ -19,7 +19,7 @@ Description: transitional dummy package for dump1090
|
||||||
|
|
||||||
Package: dump1090-fa
|
Package: dump1090-fa
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}, libbladerf1 (>= 0.2016.06), adduser, lighttpd
|
Depends: ${shlibs:Depends}, ${misc:Depends}, libbladerf1 (>= 0.2016.06), adduser
|
||||||
Replaces: dump1090 (<< 3.0)
|
Replaces: dump1090 (<< 3.0)
|
||||||
Breaks: dump1090 (<< 3.0)
|
Breaks: dump1090 (<< 3.0)
|
||||||
Description: ADS-B Ground Station System for RTL-SDR
|
Description: ADS-B Ground Station System for RTL-SDR
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
# dump1090-fa won't automatically start unless ENABLED=yes
|
# dump1090-fa won't automatically start unless ENABLED=yes
|
||||||
ENABLED=yes
|
ENABLED=yes
|
||||||
|
|
||||||
RECEIVER_OPTIONS="--device-index 0 --gain -10 --ppm 0 --net-bo-port 30005"
|
RECEIVER_OPTIONS="--device ADSB --gain -10 --ppm 0"
|
||||||
DECODER_OPTIONS="--max-range 360"
|
DECODER_OPTIONS="--max-range 800"
|
||||||
NET_OPTIONS="--net --net-heartbeat 60 --net-ro-size 1000 --net-ro-interval 1 --net-ri-port 0 --net-ro-port 30002 --net-sbs-port 30003 --net-bi-port 30004,30104 --net-bo-port 30005"
|
NET_OPTIONS="--net --net-heartbeat 60 --net-ro-size 1000 --net-ro-interval 1 --net-ri-port 0 --net-ro-port 30002 --net-sbs-port 30003 --net-bi-port 30004,30104 --net-bo-port 30005"
|
||||||
JSON_OPTIONS="--json-location-accuracy 1"
|
JSON_OPTIONS="--json-location-accuracy 1"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
public_html/* usr/share/dump1090-fa/html
|
public_html/* usr/share/dump1090-fa/html
|
||||||
debian/lighttpd/* etc/lighttpd/conf-available
|
|
||||||
bladerf/* usr/share/dump1090-fa/bladerf
|
bladerf/* usr/share/dump1090-fa/bladerf
|
||||||
debian/start-dump1090-fa usr/share/dump1090-fa/
|
debian/start-dump1090-fa usr/share/dump1090-fa/
|
||||||
|
|
|
||||||
|
|
@ -34,21 +34,40 @@ case "$1" in
|
||||||
# plugdev required for bladeRF USB access
|
# plugdev required for bladeRF USB access
|
||||||
adduser "$RUNAS" plugdev
|
adduser "$RUNAS" plugdev
|
||||||
|
|
||||||
# set up lighttpd
|
# Make sure the "data" directory is owned by dump1090 so the dump1090-fa process has write access
|
||||||
if dpkg --compare-versions "$2" lt "3.1.0"
|
jsondir="/usr/share/dump1090-fa/html/data"
|
||||||
then
|
if [ -d ${jsondir} ]; then
|
||||||
echo "Enabling lighttpd integration.." >&2
|
echo "Changing permissions on ${jsondir}..." >&2
|
||||||
lighty-enable-mod dump1090-fa || true
|
chown ${RUNAS}:nogroup ${jsondir}
|
||||||
|
chmod 755 ${jsondir}
|
||||||
# only enable the statcache config if there is nothing else around that already
|
|
||||||
# configures it, because lighttpd fails if it's configured twice
|
|
||||||
if ! grep -q -E '^\S*server.stat-cache-engine' /etc/lighttpd/conf-enabled/*.conf
|
|
||||||
then
|
|
||||||
echo "Enabling lighttpd integration (stat cache).." >&2
|
|
||||||
lighty-enable-mod dump1090-fa-statcache || true
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Update apache
|
||||||
|
changed=false
|
||||||
|
for apachefile in /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/default-ssl.conf
|
||||||
|
do
|
||||||
|
if [ -f ${apachefile} ]; then
|
||||||
|
echo "Modifying ${apachefile}..." >&2
|
||||||
|
sed -i '/<\/VirtualHost>/i \
|
||||||
|
####dump1090-start###\
|
||||||
|
Alias "/data" "/dump1090-fa/data"\
|
||||||
|
Alias "/dump1090-fa" "/usr/share/dump1090-fa/html"\
|
||||||
|
Alias "^/dump1090-fa$" "/dump1090-fa"\
|
||||||
|
SetEnvIf Request_URI "/dump1090-fa/data/.*\.json$" Header set "Access-Control-Allow-Origin" "*"\
|
||||||
|
####dump1090-end###' ${apachefile}
|
||||||
|
changed=true
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Restart apache
|
||||||
|
if $changed
|
||||||
|
then
|
||||||
|
echo "Restarting Apache..." >&2
|
||||||
|
invoke-rc.d apache2 restart || echo "Warning: apache2 failed to restart." >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# on upgrade, add an ENABLED line if it's not already present
|
# on upgrade, add an ENABLED line if it's not already present
|
||||||
if dpkg --compare-versions "$2" lt-nl "3.7.0"
|
if dpkg --compare-versions "$2" lt-nl "3.7.0"
|
||||||
then
|
then
|
||||||
|
|
@ -63,8 +82,6 @@ case "$1" in
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Restarting lighttpd.." >&2
|
|
||||||
invoke-rc.d lighttpd restart || true
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
abort-upgrade|abort-remove|abort-deconfigure)
|
abort-upgrade|abort-remove|abort-deconfigure)
|
||||||
|
|
|
||||||
|
|
@ -26,24 +26,21 @@ case "$1" in
|
||||||
|
|
||||||
remove)
|
remove)
|
||||||
changed=false
|
changed=false
|
||||||
if [ -e /etc/lighttpd/conf-enabled/89-dump1090-fa.conf ]
|
|
||||||
then
|
|
||||||
echo "Disabling lighttpd integration.." >&2
|
|
||||||
lighty-disable-mod dump1090-fa || true
|
|
||||||
changed=true
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -e /etc/lighttpd/conf-enabled/88-dump1090-fa-statcache.conf ]
|
for apachefile in /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/default-ssl.conf
|
||||||
then
|
do
|
||||||
echo "Disabling lighttpd integration (stat cache).." >&2
|
if [ -f ${apachefile} ]; then
|
||||||
lighty-disable-mod dump1090-fa-statcache || true
|
echo "Modifying apache file ${apachefile}..." >&2
|
||||||
changed=true
|
sed -i '/^[ \t]*#*dump1090-start#*/,/^[ \t]*#*dump1090-end#*/{/^[ \t]*#*dump1090-start#*/!{/^[ \t]*#*dump1090-end#*/!d}}' ${apachefile}
|
||||||
fi
|
sed -i '/[ \t]*#*dump1090-start#*/,/^[ \t]*#*dump1090-end#*/d' ${apachefile}
|
||||||
|
changed=true
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
if $changed
|
if $changed
|
||||||
then
|
then
|
||||||
echo "Restarting lighttpd.." >&2
|
echo "Restarting Apache..." >&2
|
||||||
invoke-rc.d lighttpd restart || echo "Warning: lighttpd failed to restart." >&2
|
invoke-rc.d apache2 restart || echo "Warning: apache2 failed to restart." >&2
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ After=network.target
|
||||||
User=dump1090
|
User=dump1090
|
||||||
RuntimeDirectory=dump1090-fa
|
RuntimeDirectory=dump1090-fa
|
||||||
RuntimeDirectoryMode=0755
|
RuntimeDirectoryMode=0755
|
||||||
ExecStart=/usr/share/dump1090-fa/start-dump1090-fa --write-json %t/dump1090-fa --quiet
|
ExecStart=/usr/share/dump1090-fa/start-dump1090-fa --write-json /usr/share/dump1090-fa/html/data --quiet
|
||||||
SyslogIdentifier=dump1090-fa
|
SyslogIdentifier=dump1090-fa
|
||||||
Type=simple
|
Type=simple
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
# The stat cache must be disabled, as aircraft.json changes
|
|
||||||
# frequently and lighttpd's stat cache often ends up with the
|
|
||||||
# wrong content length.
|
|
||||||
server.stat-cache-engine = "disable"
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
# Allows access to the static files that provide the dump1090 map view,
|
|
||||||
# and also to the dynamically-generated json parts that contain aircraft
|
|
||||||
# data and are periodically written by the dump1090 daemon.
|
|
||||||
|
|
||||||
alias.url += (
|
|
||||||
"/dump1090-fa/data/" => "/run/dump1090-fa/",
|
|
||||||
"/dump1090-fa/" => "/usr/share/dump1090-fa/html/"
|
|
||||||
)
|
|
||||||
|
|
||||||
# redirect the slash-less URL
|
|
||||||
url.redirect += (
|
|
||||||
"^/dump1090-fa$" => "/dump1090-fa/"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Listen on port 8080 and serve the map there, too.
|
|
||||||
$SERVER["socket"] == ":8080" {
|
|
||||||
alias.url += (
|
|
||||||
"/data/" => "/run/dump1090-fa/",
|
|
||||||
"/" => "/usr/share/dump1090-fa/html/"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
# Add CORS header
|
|
||||||
server.modules += ( "mod_setenv" )
|
|
||||||
$HTTP["url"] =~ "^/dump1090-fa/data/.*\.json$" {
|
|
||||||
setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
|
|
||||||
}
|
|
||||||
|
|
@ -23,8 +23,9 @@ DisplayUnits = "nautical";
|
||||||
// degrees.
|
// degrees.
|
||||||
|
|
||||||
// Default center of the map.
|
// Default center of the map.
|
||||||
DefaultCenterLat = 45.0;
|
// 39.234 | -103.697 - Limon, CO
|
||||||
DefaultCenterLon = 9.0;
|
DefaultCenterLat = 39.234;
|
||||||
|
DefaultCenterLon = -103.697;
|
||||||
// The google maps zoom level, 0 - 16, lower is further out
|
// The google maps zoom level, 0 - 16, lower is further out
|
||||||
DefaultZoomLvl = 7;
|
DefaultZoomLvl = 7;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,8 @@ function createBaseLayers() {
|
||||||
var us = [];
|
var us = [];
|
||||||
|
|
||||||
world.push(new ol.layer.Tile({
|
world.push(new ol.layer.Tile({
|
||||||
source: new ol.source.OSM(),
|
//source: new ol.source.OSM(),
|
||||||
|
source: new ol.source.OSM({ url: "/maps/{z}/{x}/{y}.png" }),
|
||||||
name: 'osm',
|
name: 'osm',
|
||||||
title: 'OpenStreetMap',
|
title: 'OpenStreetMap',
|
||||||
type: 'base',
|
type: 'base',
|
||||||
|
|
|
||||||
|
|
@ -1658,7 +1658,7 @@ function isPointInsideExtent(x, y, extent) {
|
||||||
function initializeUnitsSelector() {
|
function initializeUnitsSelector() {
|
||||||
// Get display unit preferences from local storage
|
// Get display unit preferences from local storage
|
||||||
if (!localStorage.getItem('displayUnits')) {
|
if (!localStorage.getItem('displayUnits')) {
|
||||||
localStorage['displayUnits'] = "nautical";
|
localStorage['displayUnits'] = "imperial";
|
||||||
}
|
}
|
||||||
var displayUnits = localStorage['displayUnits'];
|
var displayUnits = localStorage['displayUnits'];
|
||||||
DisplayUnits = displayUnits;
|
DisplayUnits = displayUnits;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue