Only enable lighttpd config once, not on every upgrade.
This commit is contained in:
parent
06cdc5071b
commit
5ba613dd44
19
debian/dump1090-fa.postinst
vendored
19
debian/dump1090-fa.postinst
vendored
|
@ -35,15 +35,18 @@ case "$1" in
|
||||||
adduser "$RUNAS" plugdev
|
adduser "$RUNAS" plugdev
|
||||||
|
|
||||||
# set up lighttpd
|
# set up lighttpd
|
||||||
echo "Enabling lighttpd integration.." >&2
|
if dpkg --compare-versions "$2" lt "3.1.0"
|
||||||
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
|
then
|
||||||
echo "Enabling lighttpd integration (stat cache).." >&2
|
echo "Enabling lighttpd integration.." >&2
|
||||||
lighty-enable-mod dump1090-fa-statcache || 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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Restarting lighttpd.." >&2
|
echo "Restarting lighttpd.." >&2
|
||||||
|
|
Loading…
Reference in a new issue