Try to avoid conflicting with other lighttpd config that
touches the stat cache settings.
This commit is contained in:
parent
abc30ff656
commit
cfb02c1a7c
9
debian/dump1090-fa.postinst
vendored
9
debian/dump1090-fa.postinst
vendored
|
@ -34,6 +34,15 @@ case "$1" in
|
||||||
# set up lighttpd
|
# set up lighttpd
|
||||||
echo "Enabling lighttpd integration.." >&2
|
echo "Enabling lighttpd integration.." >&2
|
||||||
lighty-enable-mod dump1090-fa || true
|
lighty-enable-mod dump1090-fa || true
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
echo "Restarting lighttpd.." >&2
|
echo "Restarting lighttpd.." >&2
|
||||||
invoke-rc.d lighttpd restart || true
|
invoke-rc.d lighttpd restart || true
|
||||||
;;
|
;;
|
||||||
|
|
18
debian/dump1090-fa.postrm
vendored
18
debian/dump1090-fa.postrm
vendored
|
@ -25,9 +25,23 @@ case "$1" in
|
||||||
;;
|
;;
|
||||||
|
|
||||||
remove)
|
remove)
|
||||||
if [ -e /etc/lighttpd/conf-enabled/89-dump1090.conf ]; then
|
changed=false
|
||||||
|
if [ -e /etc/lighttpd/conf-enabled/89-dump1090-fa.conf ]
|
||||||
|
then
|
||||||
echo "Disabling lighttpd integration.." >&2
|
echo "Disabling lighttpd integration.." >&2
|
||||||
lighty-disable-mod dump1090 || true
|
lighty-disable-mod dump1090-fa || true
|
||||||
|
changed=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e /etc/lighttpd/conf-enabled/88-dump1090-fa-statcache.conf ]
|
||||||
|
then
|
||||||
|
echo "Disabling lighttpd integration (stat cache).." >&2
|
||||||
|
lighty-disable-mod dump1090-fa-statcache || true
|
||||||
|
changed=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if $changed
|
||||||
|
then
|
||||||
echo "Restarting lighttpd.." >&2
|
echo "Restarting lighttpd.." >&2
|
||||||
invoke-rc.d lighttpd restart || echo "Warning: lighttpd failed to restart." >&2
|
invoke-rc.d lighttpd restart || echo "Warning: lighttpd failed to restart." >&2
|
||||||
fi
|
fi
|
||||||
|
|
4
debian/lighttpd/88-dump1090-fa-statcache.conf
vendored
Normal file
4
debian/lighttpd/88-dump1090-fa-statcache.conf
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# 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"
|
5
debian/lighttpd/89-dump1090-fa.conf
vendored
5
debian/lighttpd/89-dump1090-fa.conf
vendored
|
@ -7,11 +7,6 @@ alias.url += (
|
||||||
"/dump1090-fa/" => "/usr/share/dump1090-fa/html/"
|
"/dump1090-fa/" => "/usr/share/dump1090-fa/html/"
|
||||||
)
|
)
|
||||||
|
|
||||||
# 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"
|
|
||||||
|
|
||||||
# Listen on port 8080 and emit 301s pointing to port 80
|
# Listen on port 8080 and emit 301s pointing to port 80
|
||||||
# to support the old convention of the map being on 8080
|
# to support the old convention of the map being on 8080
|
||||||
$SERVER["socket"] == ":8080" {
|
$SERVER["socket"] == ":8080" {
|
||||||
|
|
Loading…
Reference in a new issue