Make the lighttpd enable/disable a bit more automatic.
This commit is contained in:
parent
ebfa6f63be
commit
9012b46ee1
8
debian/dump1090-mutability.postinst
vendored
8
debian/dump1090-mutability.postinst
vendored
|
@ -116,6 +116,14 @@ case "$1" in
|
||||||
touch $RET
|
touch $RET
|
||||||
chown $RUNAS $RET
|
chown $RUNAS $RET
|
||||||
|
|
||||||
|
# enable lighttpd if needed
|
||||||
|
db_get $NAME/use-lighttpd
|
||||||
|
if [ "$RET" = "true" -a -x /usr/sbin/lighty-enable-mod ]
|
||||||
|
then
|
||||||
|
echo "Enabling lighttpd integration.." >&2
|
||||||
|
/usr/sbin/lighty-enable-mod dump1090 || true
|
||||||
|
fi
|
||||||
|
|
||||||
# this config file has changed a few times, restart lighttpd to make sure we
|
# this config file has changed a few times, restart lighttpd to make sure we
|
||||||
# have the latest version
|
# have the latest version
|
||||||
if [ -e /etc/lighttpd/conf-enabled/89-dump1090.conf ]; then
|
if [ -e /etc/lighttpd/conf-enabled/89-dump1090.conf ]; then
|
||||||
|
|
11
debian/dump1090-mutability.postrm
vendored
11
debian/dump1090-mutability.postrm
vendored
|
@ -26,7 +26,16 @@ case "$1" in
|
||||||
rm -rf /var/cache/dump1090-mutability
|
rm -rf /var/cache/dump1090-mutability
|
||||||
;;
|
;;
|
||||||
|
|
||||||
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
remove)
|
||||||
|
if [ -e /etc/lighttpd/conf-enabled/89-dump1090.conf ]; then
|
||||||
|
echo "Disabling lighttpd integration.." >&2
|
||||||
|
lighty-disable-mod dump1090 || true
|
||||||
|
echo "Restarting lighttpd.." >&2
|
||||||
|
invoke-rc.d lighttpd restart || echo "Warning: lighttpd failed to restart." >&2
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|
11
debian/dump1090-mutability.templates
vendored
11
debian/dump1090-mutability.templates
vendored
|
@ -186,13 +186,22 @@ Description: Interval between logging stats, in seconds:
|
||||||
Type: string
|
Type: string
|
||||||
Default: 3600
|
Default: 3600
|
||||||
|
|
||||||
|
Template: dump1090-mutability/use-lighttpd
|
||||||
|
Description: Enable the lighttpd integration?
|
||||||
|
dump1090 can serve a virtual radar map via a separate webserver.
|
||||||
|
This package includes a configuration for lighttpd that does this.
|
||||||
|
To use that configuration, enable this option.
|
||||||
|
Type: boolean
|
||||||
|
Default: true
|
||||||
|
|
||||||
Template: dump1090-mutability/json-dir
|
Template: dump1090-mutability/json-dir
|
||||||
Description: Directory to write JSON aircraft state to:
|
Description: Directory to write JSON aircraft state to:
|
||||||
As this can be written frequently, you should select a location
|
As this can be written frequently, you should select a location
|
||||||
that is not on a sdcard. The default path under /run is on tmpfs
|
that is not on a sdcard. The default path under /run is on tmpfs
|
||||||
and will not write to the sdcard.
|
and will not write to the sdcard.
|
||||||
.
|
.
|
||||||
A blank path disables writing JSON state.
|
A blank path disables writing JSON state. This will also disable
|
||||||
|
the virtual radar map.
|
||||||
Type: string
|
Type: string
|
||||||
Default: /run/dump1090-mutability
|
Default: /run/dump1090-mutability
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue