From 3241478f72bd7a66e2b14b71c28be50f243b68e0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mario=20H=C3=B6llein?= Date: Mon, 10 Feb 2020 14:17:48 +0100 Subject: [PATCH] committing changes in /etc made by "apt-get install dump1090-mutability" Package changes: +dump1090-mutability 1.15~20180310.4a16df3+dfsg-6 amd64 +gamin 0.1.10-5build1 amd64 +libgamin0 0.1.10-5build1 amd64 +libjs-jquery-ui-theme-smoothness 1.12.1+dfsg-1 all +lighttpd 1.4.53-4ubuntu2 amd64 +lighttpd-modules-ldap 1.4.53-4ubuntu2 amd64 +lighttpd-modules-mysql 1.4.53-4ubuntu2 amd64 +spawn-fcgi 1.6.4-2 amd64 --- .etckeeper | 42 ++++ .../conf-available/dump1090-mutability.conf | 16 ++ apache2/conf-enabled/dump1090-mutability.conf | 1 + cron.daily/lighttpd | 10 + default/dump1090-mutability | 104 +++++++++ dump1090-mutability/config.js | 135 ++++++++++++ gamin/gaminrc | 23 ++ init.d/dump1090-mutability | 201 ++++++++++++++++++ init.d/lighttpd | 123 +++++++++++ lighttpd/conf-available/05-auth.conf | 25 +++ lighttpd/conf-available/10-accesslog.conf | 3 + lighttpd/conf-available/10-cgi.conf | 16 ++ lighttpd/conf-available/10-dir-listing.conf | 2 + lighttpd/conf-available/10-evasive.conf | 1 + lighttpd/conf-available/10-evhost.conf | 5 + lighttpd/conf-available/10-expire.conf | 3 + lighttpd/conf-available/10-fastcgi.conf | 4 + lighttpd/conf-available/10-flv-streaming.conf | 1 + lighttpd/conf-available/10-no-www.conf | 3 + lighttpd/conf-available/10-proxy.conf | 25 +++ lighttpd/conf-available/10-rewrite.conf | 4 + lighttpd/conf-available/10-rrdtool.conf | 10 + lighttpd/conf-available/10-simple-vhost.conf | 11 + lighttpd/conf-available/10-sockproxy.conf | 14 ++ lighttpd/conf-available/10-ssi.conf | 5 + lighttpd/conf-available/10-ssl.conf | 9 + lighttpd/conf-available/10-status.conf | 15 ++ lighttpd/conf-available/10-userdir.conf | 13 ++ lighttpd/conf-available/10-usertrack.conf | 1 + lighttpd/conf-available/11-extforward.conf | 6 + lighttpd/conf-available/15-fastcgi-php.conf | 20 ++ lighttpd/conf-available/89-dump1090.conf | 18 ++ lighttpd/conf-available/90-debian-doc.conf | 15 ++ lighttpd/conf-available/99-unconfigured.conf | 3 + lighttpd/conf-available/README | 22 ++ lighttpd/conf-enabled/89-dump1090.conf | 1 + lighttpd/lighttpd.conf | 52 +++++ logrotate.d/dump1090-mutability | 5 + logrotate.d/lighttpd | 16 ++ nginx/sites-available/dump1090-mutability | 16 ++ passwd | 1 + passwd- | 3 +- rc0.d/K01dump1090-mutability | 1 + rc0.d/K01lighttpd | 1 + rc1.d/K01dump1090-mutability | 1 + rc1.d/K01lighttpd | 1 + rc2.d/S02dump1090-mutability | 1 + rc2.d/S04lighttpd | 1 + rc3.d/S02dump1090-mutability | 1 + rc3.d/S04lighttpd | 1 + rc4.d/S02dump1090-mutability | 1 + rc4.d/S04lighttpd | 1 + rc5.d/S02dump1090-mutability | 1 + rc5.d/S04lighttpd | 1 + rc6.d/K01dump1090-mutability | 1 + rc6.d/K01lighttpd | 1 + shadow | 1 + shadow- | 5 +- .../multi-user.target.wants/lighttpd.service | 1 + ufw/applications.d/lighttpd | 14 ++ 60 files changed, 1035 insertions(+), 3 deletions(-) create mode 100644 apache2/conf-available/dump1090-mutability.conf create mode 120000 apache2/conf-enabled/dump1090-mutability.conf create mode 100755 cron.daily/lighttpd create mode 100644 default/dump1090-mutability create mode 100644 dump1090-mutability/config.js create mode 100644 gamin/gaminrc create mode 100755 init.d/dump1090-mutability create mode 100755 init.d/lighttpd create mode 100644 lighttpd/conf-available/05-auth.conf create mode 100644 lighttpd/conf-available/10-accesslog.conf create mode 100644 lighttpd/conf-available/10-cgi.conf create mode 100644 lighttpd/conf-available/10-dir-listing.conf create mode 100644 lighttpd/conf-available/10-evasive.conf create mode 100644 lighttpd/conf-available/10-evhost.conf create mode 100644 lighttpd/conf-available/10-expire.conf create mode 100644 lighttpd/conf-available/10-fastcgi.conf create mode 100644 lighttpd/conf-available/10-flv-streaming.conf create mode 100644 lighttpd/conf-available/10-no-www.conf create mode 100644 lighttpd/conf-available/10-proxy.conf create mode 100644 lighttpd/conf-available/10-rewrite.conf create mode 100644 lighttpd/conf-available/10-rrdtool.conf create mode 100644 lighttpd/conf-available/10-simple-vhost.conf create mode 100644 lighttpd/conf-available/10-sockproxy.conf create mode 100644 lighttpd/conf-available/10-ssi.conf create mode 100644 lighttpd/conf-available/10-ssl.conf create mode 100644 lighttpd/conf-available/10-status.conf create mode 100644 lighttpd/conf-available/10-userdir.conf create mode 100644 lighttpd/conf-available/10-usertrack.conf create mode 100644 lighttpd/conf-available/11-extforward.conf create mode 100644 lighttpd/conf-available/15-fastcgi-php.conf create mode 100644 lighttpd/conf-available/89-dump1090.conf create mode 100644 lighttpd/conf-available/90-debian-doc.conf create mode 100644 lighttpd/conf-available/99-unconfigured.conf create mode 100644 lighttpd/conf-available/README create mode 120000 lighttpd/conf-enabled/89-dump1090.conf create mode 100644 lighttpd/lighttpd.conf create mode 100644 logrotate.d/dump1090-mutability create mode 100644 logrotate.d/lighttpd create mode 100644 nginx/sites-available/dump1090-mutability create mode 120000 rc0.d/K01dump1090-mutability create mode 120000 rc0.d/K01lighttpd create mode 120000 rc1.d/K01dump1090-mutability create mode 120000 rc1.d/K01lighttpd create mode 120000 rc2.d/S02dump1090-mutability create mode 120000 rc2.d/S04lighttpd create mode 120000 rc3.d/S02dump1090-mutability create mode 120000 rc3.d/S04lighttpd create mode 120000 rc4.d/S02dump1090-mutability create mode 120000 rc4.d/S04lighttpd create mode 120000 rc5.d/S02dump1090-mutability create mode 120000 rc5.d/S04lighttpd create mode 120000 rc6.d/K01dump1090-mutability create mode 120000 rc6.d/K01lighttpd create mode 120000 systemd/system/multi-user.target.wants/lighttpd.service create mode 100644 ufw/applications.d/lighttpd diff --git a/.etckeeper b/.etckeeper index 163cf05..de0b6f2 100755 --- a/.etckeeper +++ b/.etckeeper @@ -328,6 +328,7 @@ maybe chmod 0755 'apache2' maybe chmod 0644 'apache2/apache2.conf' maybe chmod 0755 'apache2/conf-available' maybe chmod 0644 'apache2/conf-available/charset.conf' +maybe chmod 0644 'apache2/conf-available/dump1090-mutability.conf' maybe chmod 0644 'apache2/conf-available/javascript-common.conf' maybe chmod 0644 'apache2/conf-available/localized-error-pages.conf' maybe chmod 0644 'apache2/conf-available/other-vhosts-access-log.conf' @@ -1395,6 +1396,7 @@ maybe chmod 0755 'cron.daily/devolo-updates' maybe chmod 0755 'cron.daily/dpkg' maybe chmod 0755 'cron.daily/etckeeper' maybe chmod 0755 'cron.daily/fwlogwatch' +maybe chmod 0755 'cron.daily/lighttpd' maybe chmod 0755 'cron.daily/logrotate' maybe chmod 0755 'cron.daily/man-db' maybe chmod 0755 'cron.daily/mlocate' @@ -1532,6 +1534,7 @@ maybe chmod 0644 'default/cryptdisks' maybe chmod 0644 'default/dbus' maybe chmod 0644 'default/devolo-updates' maybe chmod 0644 'default/devpts' +maybe chmod 0644 'default/dump1090-mutability' maybe chmod 0644 'default/fwlogwatch' maybe chmod 0644 'default/google-chrome' maybe chmod 0644 'default/grub' @@ -1623,6 +1626,8 @@ maybe chmod 0644 'dpkg/origins/ubuntu' maybe chmod 0644 'dpkg/shlibs.default' maybe chmod 0644 'dpkg/shlibs.override' maybe chmod 0644 'drirc' +maybe chmod 0755 'dump1090-mutability' +maybe chmod 0644 'dump1090-mutability/config.js' maybe chmod 0644 'e2scrub.conf' maybe chmod 0755 'emacs' maybe chmod 0755 'emacs/site-start.d' @@ -1817,6 +1822,8 @@ maybe chmod 0644 'fwupd/remotes.d/vendor-directory.conf' maybe chmod 0644 'fwupd/remotes.d/vendor.conf' maybe chmod 0644 'fwupd/uefi.conf' maybe chmod 0644 'gai.conf' +maybe chmod 0755 'gamin' +maybe chmod 0644 'gamin/gaminrc' maybe chmod 0755 'gconf' maybe chmod 0755 'gconf/2' maybe chmod 0644 'gconf/2/evoldap.conf' @@ -1967,6 +1974,7 @@ maybe chmod 0755 'init.d/cups-browsed' maybe chmod 0755 'init.d/dbus' maybe chmod 0755 'init.d/devolonetsvc' maybe chmod 0755 'init.d/dns-clean' +maybe chmod 0755 'init.d/dump1090-mutability' maybe chmod 0755 'init.d/fancontrol' maybe chmod 0755 'init.d/fhem' maybe chmod 0755 'init.d/fwlogwatch' @@ -1981,6 +1989,7 @@ maybe chmod 0755 'init.d/keyboard-setup.sh' maybe chmod 0755 'init.d/killprocs' maybe chmod 0755 'init.d/kmod' maybe chmod 0755 'init.d/lightdm' +maybe chmod 0755 'init.d/lighttpd' maybe chmod 0755 'init.d/lm-sensors' maybe chmod 0755 'init.d/lvm2' maybe chmod 0755 'init.d/lvm2-lvmpolld' @@ -2255,8 +2264,35 @@ maybe chmod 0755 'lightdm/lightdm.conf.d' maybe chmod 0644 'lightdm/users.conf' maybe chmod 0755 'lighttpd' maybe chmod 0755 'lighttpd/conf-available' +maybe chmod 0644 'lighttpd/conf-available/05-auth.conf' +maybe chmod 0644 'lighttpd/conf-available/10-accesslog.conf' +maybe chmod 0644 'lighttpd/conf-available/10-cgi.conf' +maybe chmod 0644 'lighttpd/conf-available/10-dir-listing.conf' +maybe chmod 0644 'lighttpd/conf-available/10-evasive.conf' +maybe chmod 0644 'lighttpd/conf-available/10-evhost.conf' +maybe chmod 0644 'lighttpd/conf-available/10-expire.conf' +maybe chmod 0644 'lighttpd/conf-available/10-fastcgi.conf' +maybe chmod 0644 'lighttpd/conf-available/10-flv-streaming.conf' +maybe chmod 0644 'lighttpd/conf-available/10-no-www.conf' +maybe chmod 0644 'lighttpd/conf-available/10-proxy.conf' +maybe chmod 0644 'lighttpd/conf-available/10-rewrite.conf' +maybe chmod 0644 'lighttpd/conf-available/10-rrdtool.conf' +maybe chmod 0644 'lighttpd/conf-available/10-simple-vhost.conf' +maybe chmod 0644 'lighttpd/conf-available/10-sockproxy.conf' +maybe chmod 0644 'lighttpd/conf-available/10-ssi.conf' +maybe chmod 0644 'lighttpd/conf-available/10-ssl.conf' +maybe chmod 0644 'lighttpd/conf-available/10-status.conf' +maybe chmod 0644 'lighttpd/conf-available/10-userdir.conf' +maybe chmod 0644 'lighttpd/conf-available/10-usertrack.conf' +maybe chmod 0644 'lighttpd/conf-available/11-extforward.conf' +maybe chmod 0644 'lighttpd/conf-available/15-fastcgi-php.conf' +maybe chmod 0644 'lighttpd/conf-available/89-dump1090.conf' +maybe chmod 0644 'lighttpd/conf-available/90-debian-doc.conf' maybe chmod 0644 'lighttpd/conf-available/90-javascript-alias.conf' +maybe chmod 0644 'lighttpd/conf-available/99-unconfigured.conf' +maybe chmod 0644 'lighttpd/conf-available/README' maybe chmod 0755 'lighttpd/conf-enabled' +maybe chmod 0644 'lighttpd/lighttpd.conf' maybe chmod 0644 'lintianrc' maybe chmod 0644 'locale.alias' maybe chmod 0644 'locale.gen' @@ -2285,8 +2321,10 @@ maybe chmod 0644 'logrotate.d/aptitude' maybe chmod 0644 'logrotate.d/btmp' maybe chmod 0644 'logrotate.d/cups-daemon' maybe chmod 0644 'logrotate.d/dpkg' +maybe chmod 0644 'logrotate.d/dump1090-mutability' maybe chmod 0644 'logrotate.d/iptraf-ng' maybe chmod 0644 'logrotate.d/lightdm' +maybe chmod 0644 'logrotate.d/lighttpd' maybe chmod 0644 'logrotate.d/mongodb-server' maybe chmod 0644 'logrotate.d/mysql-server' maybe chmod 0644 'logrotate.d/pm-utils' @@ -2431,6 +2469,9 @@ maybe chmod 0644 'newt/palette.original' maybe chmod 0644 'newt/palette.ubuntu' maybe chmod 0755 'nfc' maybe chmod 0644 'nfc/libnfc.conf' +maybe chmod 0755 'nginx' +maybe chmod 0755 'nginx/sites-available' +maybe chmod 0644 'nginx/sites-available/dump1090-mutability' maybe chmod 0644 'nsswitch.conf' maybe chmod 0644 'ntp.conf' maybe chmod 0644 'nvcc.profile' @@ -3171,6 +3212,7 @@ maybe chmod 0755 'ufw/applications.d' maybe chmod 0755 'ufw/applications.d/apache2' maybe chmod 0644 'ufw/applications.d/apache2-utils.ufw.profile' maybe chmod 0644 'ufw/applications.d/cups' +maybe chmod 0644 'ufw/applications.d/lighttpd' maybe chmod 0644 'ufw/applications.d/openssh-server' maybe chmod 0644 'ufw/applications.d/postfix' maybe chmod 0640 'ufw/before.init' diff --git a/apache2/conf-available/dump1090-mutability.conf b/apache2/conf-available/dump1090-mutability.conf new file mode 100644 index 0000000..d56ceba --- /dev/null +++ b/apache2/conf-available/dump1090-mutability.conf @@ -0,0 +1,16 @@ + +Alias /dump1090/data /run/dump1090-mutability/ +Alias /dump1090 /usr/share/dump1090-mutability/html/ + + + Options +FollowSymLinks + AllowOverride All + Require all granted + DirectoryIndex gmap.html + + + + AllowOverride All + Require all granted + DirectoryIndex disabled + diff --git a/apache2/conf-enabled/dump1090-mutability.conf b/apache2/conf-enabled/dump1090-mutability.conf new file mode 120000 index 0000000..957a1f9 --- /dev/null +++ b/apache2/conf-enabled/dump1090-mutability.conf @@ -0,0 +1 @@ +../conf-available/dump1090-mutability.conf \ No newline at end of file diff --git a/cron.daily/lighttpd b/cron.daily/lighttpd new file mode 100755 index 0000000..5888e18 --- /dev/null +++ b/cron.daily/lighttpd @@ -0,0 +1,10 @@ +#!/bin/sh +# Cleanup lighttpd compress cache + +cache=/var/cache/lighttpd +if test -d "$cache/compress"; then + su -s /bin/sh -c "find $cache/compress -type f -atime +30 -print0 | xargs -0 -r rm" www-data +fi +if test -d "$cache/uploads"; then + su -s /bin/sh -c "find $cache/uploads -type f -atime +1 -print0 | xargs -0 -r rm" www-data +fi diff --git a/default/dump1090-mutability b/default/dump1090-mutability new file mode 100644 index 0000000..fb1d885 --- /dev/null +++ b/default/dump1090-mutability @@ -0,0 +1,104 @@ +# dump1090-mutability configuration file +# This is a POSIX shell fragment. +# You can edit this file directly, or use +# "dpkg-reconfigure dump1090-mutability" + +# Set to "yes" to start dump1090 on boot. +START_DUMP1090="no" + +# User to run dump1090 as. +DUMP1090_USER="dump1090" + +# Logfile to log to +LOGFILE="/var/log/dump1090-mutability.log" + +# +# Receiver options +# + +# RTLSDR device index or serial number to use +# If set to "none", dump1090 will be started in --net-only mode +DEVICE="" + +# RTLSDR gain in dB. +# If set to "max" (the default) the maximum supported gain is used. +# If set to "agc", the tuner AGC is used to set the gain. +GAIN="max" + +# RTLSDR frequency correction in PPM +PPM="0" + +# +# Decoding options +# + +# If yes, fixes messages with correctable CRC errors. +FIX_CRC="yes" + +# If set, supplies a reference location for local position decoding. +LAT="" +LON="" + +# If set, provides the absolute maximum receiver range used to +# filter bad position reports, and to determine when local position +# decoding is safe to use. Specify this in nautical miles (NM). +MAX_RANGE="300" + +# +# Networking options +# + +# Port to listen on for raw (AVR-format) input connections. 0 disables. +RAW_INPUT_PORT="30001" + +# Port to listen on for raw (AVR-format) output connections. 0 disables. +RAW_OUTPUT_PORT="30002" + +# Port to listen on for SBS-format output connections. 0 disables. +SBS_OUTPUT_PORT="30003" + +# Port to listen on for Beast-format input connections. 0 disables. +BEAST_INPUT_PORT="30004,30104" + +# Port to listen on for Beast-format output connections. 0 disables. +BEAST_OUTPUT_PORT="30005" + +# TCP heartbeat interval in seconds. 0 disables. +NET_HEARTBEAT="60" + +# Minimum output buffer size per write, in bytes. +NET_OUTPUT_SIZE="500" + +# Maximum buffering time before writing, in seconds. +NET_OUTPUT_INTERVAL="1" + +# TCP buffer size, in bytes +NET_BUFFER="262144" + +# Bind ports on a particular address. If unset, binds to all interfaces. +# This defaults to binding to localhost. If you need to allow remote +# connections, change this. +NET_BIND_ADDRESS="127.0.0.1" + +# +# Misc options +# + +# Interval (in seconds) between logging stats to the logfile. 0 disables. +STATS_INTERVAL="3600" + +# Path to write json state to (for use with an external webserver). Blank disables. +JSON_DIR="/run/dump1090-mutability" + +# Interval between writing json state (in seconds). 0 disables. +JSON_INTERVAL="1" + +# Accuracy of receiver location to write to json state, one of "exact" / "approximate" / "none" +JSON_LOCATION_ACCURACY="approximate" + +# Set to yes to log all decoded messages +# This can get large fast! +LOG_DECODED_MESSAGES="no" + +# Additional options that are passed to the Daemon. +EXTRA_ARGS="" diff --git a/dump1090-mutability/config.js b/dump1090-mutability/config.js new file mode 100644 index 0000000..339fb73 --- /dev/null +++ b/dump1090-mutability/config.js @@ -0,0 +1,135 @@ +// -------------------------------------------------------- +// +// This file is to configure the configurable settings. +// Load this file before script.js file at gmap.html. +// +// -------------------------------------------------------- + +// -- Title Settings -------------------------------------- +// Show number of aircraft and/or messages per second in the page title +PlaneCountInTitle = true; +MessageRateInTitle = false; + +// -- Output Settings ------------------------------------- +// Show metric values +// The Metric setting controls whether metric (m, km, km/h) or +// imperial (ft, NM, knots) units are used in the plane table +// and in the detailed plane info. If ShowOtherUnits is true, +// then the other unit will also be shown in the detailed plane +// info. +Metric = false; +ShowOtherUnits = true; + +// -- Map settings ---------------------------------------- +// These settings are overridden by any position information +// provided by dump1090 itself. All positions are in decimal +// degrees. + +// Default center of the map. +DefaultCenterLat = 45.0; +DefaultCenterLon = 9.0; +// The google maps zoom level, 0 - 16, lower is further out +DefaultZoomLvl = 7; + +// Center marker. If dump1090 provides a receiver location, +// that location is used and these settings are ignored. + +SiteShow = false; // true to show a center marker +SiteLat = 45.0; // position of the marker +SiteLon = 9.0; +SiteName = "My Radar Site"; // tooltip of the marker + +// -- Marker settings ------------------------------------- + +// These settings control the coloring of aircraft by altitude. +// All color values are given as Hue (0-359) / Saturation (0-100) / Lightness (0-100) +ColorByAlt = { + // HSL for planes with unknown altitude: + unknown : { h: 0, s: 0, l: 40 }, + + // HSL for planes that are on the ground: + ground : { h: 120, s: 100, l: 30 }, + + air : { + // These define altitude-to-hue mappings + // at particular altitudes; the hue + // for intermediate altitudes that lie + // between the provided altitudes is linearly + // interpolated. + // + // Mappings must be provided in increasing + // order of altitude. + // + // Altitudes below the first entry use the + // hue of the first entry; altitudes above + // the last entry use the hue of the last + // entry. + h: [ { alt: 2000, val: 20 }, // orange + { alt: 10000, val: 140 }, // light green + { alt: 40000, val: 300 } ], // magenta + s: 85, + l: 50, + }, + + // Changes added to the color of the currently selected plane + selected : { h: 0, s: -10, l: +20 }, + + // Changes added to the color of planes that have stale position info + stale : { h: 0, s: -10, l: +30 }, + + // Changes added to the color of planes that have positions from mlat + mlat : { h: 0, s: -10, l: -10 } +}; + +// For a monochrome display try this: +// ColorByAlt = { +// unknown : { h: 0, s: 0, l: 40 }, +// ground : { h: 0, s: 0, l: 30 }, +// air : { h: [ { alt: 0, val: 0 } ], s: 0, l: 50 }, +// selected : { h: 0, s: 0, l: +30 }, +// stale : { h: 0, s: 0, l: +30 }, +// mlat : { h: 0, s: 0, l: -10 } +// }; + +// Outline color for aircraft icons with an ADS-B position +OutlineADSBColor = '#000000'; + +// Outline color for aircraft icons with a mlat position +OutlineMlatColor = '#4040FF'; + +SiteCircles = true; // true to show circles (only shown if the center marker is shown) +// In nautical miles or km (depending settings value 'Metric') +SiteCirclesDistances = new Array(100,150,200); + +// Show the clocks at the top of the righthand pane? You can disable the clocks if you want here +ShowClocks = true; + +// Controls page title, righthand pane when nothing is selected +PageName = "DUMP1090"; + +// Show country flags by ICAO addresses? +ShowFlags = true; + +// Path to country flags (can be a relative or absolute URL; include a trailing /) +FlagPath = "flags-tiny/"; + +// Set to true to enable the ChartBundle base layers (US coverage only) +ChartBundleLayers = true; + +// Provide a Bing Maps API key here to enable the Bing imagery layer. +// You can obtain a free key (with usage limits) at +// https://www.bingmapsportal.com/ (you need a "basic key") +// +// Be sure to quote your key: +// BingMapsAPIKey = "your key here"; +// +BingMapsAPIKey = null; + +// Provide a Mapzen API key here to enable the Mapzen vector tile layer. +// You can obtain a free key at https://mapzen.com/developers/ +// (you need a "vector tiles" key) +// +// Be sure to quote your key: +// MapzenAPIKey = "your key here"; +// +MapzenAPIKey = null; diff --git a/gamin/gaminrc b/gamin/gaminrc new file mode 100644 index 0000000..1370f5b --- /dev/null +++ b/gamin/gaminrc @@ -0,0 +1,23 @@ +# configuration for gamin +# Can be used to override the default behaviour. +# notify filepath(s) : indicate to use kernel notification +# poll filepath(s) : indicate to use polling instead +# fsset fsname method poll_limit : indicate what method of notification for +# the filesystem +# kernel - use the kernel for notification +# poll - use polling for notification +# none - don't use any notification +# +# the poll_limit is the number of seconds +# that must pass before a resource is polled +# again. It is optional, and if it is not +# present the previous value will be used +# or the default. +# +# Some examples: +# notify /mnt/local* /mnt/pictures* # use kernel notification on these paths +# poll /temp/* # use poll notification on these paths +# fsset nfs poll 10 # use polling on nfs mounts and poll once + # every 10 seconds + + diff --git a/init.d/dump1090-mutability b/init.d/dump1090-mutability new file mode 100755 index 0000000..58533f3 --- /dev/null +++ b/init.d/dump1090-mutability @@ -0,0 +1,201 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: dump1090-mutability +# Required-Start: $remote_fs $network +# Required-Stop: $remote_fs $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: dump1090 daemon (mutability variant) +# Description: Receives ADS-B messages from a RTLSDR dongle +# and makes them available to other applications via +# a variety of network protocols. +### END INIT INFO + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="dump1090-mutability daemon" +NAME=dump1090-mutability +DAEMON=/usr/bin/$NAME +ARGS="" +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# work out daemon args + +# sanitize missing settings +[ -z "$START_DUMP1090" ] && START_DUMP1090=no +[ -z "$DUMP1090_USER" ] && DUMP1090_USER="missing-DUMP1090_USER-setting-in-config" +[ -z "$RAW_INPUT_PORT" ] && RAW_INPUT_PORT=0 +[ -z "$RAW_OUTPUT_PORT" ] && RAW_OUTPUT_PORT=0 +[ -z "$SBS_OUTPUT_PORT" ] && SBS_OUTPUT_PORT=0 +[ -z "$BEAST_INPUT_PORT" ] && BEAST_INPUT_PORT=0 +[ -z "$BEAST_OUTPUT_PORT" ] && BEAST_OUTPUT_PORT=0 +[ -z "$NET_BUFFER" ] && NET_BUFFER=0 +[ -z "$JSON_INTERVAL" ] && JSON_INTERVAL=0 +[ -z "$MAX_RANGE" ] && MAX_RANGE=300 + +# receiver: +NICELEVEL="--nicelevel -5" +case "x$DEVICE" in + x|x0) ARGS="$ARGS --net" ;; + xnone) ARGS="$ARGS --net-only"; NICELEVEL="" ;; + *) ARGS="$ARGS --net --device-index $DEVICE" ;; +esac +case "x$GAIN" in + x|xmax) ;; + xagc) ARGS="$ARGS --gain -10" ;; + *) ARGS="$ARGS --gain $GAIN" ;; +esac +if [ -n "$PPM" ]; then ARGS="$ARGS --ppm $PPM"; fi + +# decoder: +if [ "x$FIX_CRC" = "xyes" ]; then ARGS="$ARGS --fix"; fi +if [ -n "$LAT" ]; then ARGS="$ARGS --lat $LAT"; fi +if [ -n "$LON" ]; then ARGS="$ARGS --lon $LON"; fi +ARGS="$ARGS --max-range $MAX_RANGE" + +# net: + +ARGS="$ARGS \ +--net-ri-port $RAW_INPUT_PORT --net-ro-port $RAW_OUTPUT_PORT \ +--net-bi-port $BEAST_INPUT_PORT --net-bo-port $BEAST_OUTPUT_PORT \ +--net-sbs-port $SBS_OUTPUT_PORT" +if [ -n "$NET_HEARTBEAT" ]; then ARGS="$ARGS --net-heartbeat $NET_HEARTBEAT"; fi +if [ -n "$NET_OUTPUT_SIZE" ]; then ARGS="$ARGS --net-ro-size $NET_OUTPUT_SIZE"; fi +if [ -n "$NET_OUTPUT_INTERVAL" ]; then ARGS="$ARGS --net-ro-interval $NET_OUTPUT_INTERVAL"; fi +if [ "$NET_BUFFER" -le "65536" ]; then ARGS="$ARGS --net-buffer 0" +elif [ "$NET_BUFFER" -le "131072" ]; then ARGS="$ARGS --net-buffer 1" +elif [ "$NET_BUFFER" -le "262144" ]; then ARGS="$ARGS --net-buffer 2" +else ARGS="$ARGS --net-buffer 3"; fi +if [ -n "$NET_BIND_ADDRESS" ]; then ARGS="$ARGS --net-bind-address $NET_BIND_ADDRESS"; fi + +# misc: +if [ -n "$STATS_INTERVAL" ]; then ARGS="$ARGS --stats-every $STATS_INTERVAL"; fi +if [ -n "$JSON_DIR" ]; then ARGS="$ARGS --write-json $JSON_DIR"; fi +if [ -n "$JSON_INTERVAL" ]; then ARGS="$ARGS --write-json-every $JSON_INTERVAL"; fi +case "x$JSON_LOCATION_ACCURACY" in + xexact) ARGS="$ARGS --json-location-accuracy 2" ;; + xapproximate) ARGS="$ARGS --json-location-accuracy 1" ;; + *) ARGS="$ARGS --json-location-accuracy 0" ;; +esac + +if [ "x$LOG_DECODED_MESSAGES" != "xyes" ]; then ARGS="$ARGS --quiet"; fi + +if [ -n "$EXTRA_ARGS" ]; then ARGS="$ARGS $EXTRA_ARGS"; fi + +# Load the VERBOSE setting and other rcS variables +. /lib/init/vars.sh + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.2-14) to ensure that this file is present +# and status_of_proc is working. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + + if [ "x$START_DUMP1090" != "xyes" ]; then + log_warning_msg "Not starting $NAME daemon, disabled via /etc/default/$NAME" + return 2 + fi + + start-stop-daemon --start --quiet --pidfile $PIDFILE --user "$DUMP1090_USER" --exec $DAEMON --test > /dev/null \ + || return 1 + + # create JSON_DIR with the appropriate permissions + # (it is on /run by default, so will be lost on reboot) + if [ "x$JSON_DIR" != "x" ]; then + if [ ! -e $JSON_DIR ]; then + (mkdir $JSON_DIR && chmod 0755 $JSON_DIR && chown $DUMP1090_USER $JSON_DIR) || log_warning_msg "Failed to create $JSON_DIR" + fi + fi + + # create logfile with the appropriate permissions if not already there + touch $LOGFILE + chown "$DUMP1090_USER":root $LOGFILE + + start-stop-daemon --start $NICELEVEL --quiet --pidfile $PIDFILE --user "$DUMP1090_USER" --chuid "$DUMP1090_USER" --make-pidfile --background --no-close --exec $DAEMON -- \ + $ARGS >>$LOGFILE 2>&1 \ + || return 2 + sleep 1 +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --retry=TERM/30/KILL/5 --pidfile $PIDFILE --user "$DUMP1090_USER" --exec $DAEMON + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + sleep 1 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + restart|force-reload) + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/init.d/lighttpd b/init.d/lighttpd new file mode 100755 index 0000000..7adccbe --- /dev/null +++ b/init.d/lighttpd @@ -0,0 +1,123 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: lighttpd +# Required-Start: $local_fs $remote_fs $network $syslog +# Required-Stop: $local_fs $remote_fs $network $syslog +# Should-Start: fam +# Should-Stop: fam +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start the lighttpd web server. +# Description: Fast and smalle webserver with minimal memory footprint +# developed with security in mind HTTP/1.1 compliant caching +# proxy server. +### END INIT INFO + + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/lighttpd +NAME=lighttpd +DESC="web server" +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +DAEMON_OPTS="-f /etc/lighttpd/lighttpd.conf" + +test -x $DAEMON || exit 0 + +set -e + +check_syntax() +{ + $DAEMON -tt $DAEMON_OPTS > /dev/null || exit $? +} + +if [ "$1" != status ]; then + # be sure there is a /var/run/lighttpd, even with tmpfs + # The directory is defined as volatile and may thus be non-existing + # after a boot (DPM §9.3.2) + owner=www-data + group=www-data + [ -d /var/cache/lighttpd ] || \ + install -d -o $owner -g $group -m 0750 "/var/cache/lighttpd" + [ -d /var/cache/lighttpd/compress ] || \ + install -d -o $owner -g $group -m 0750 "/var/cache/lighttpd/compress" + [ -d /var/cache/lighttpd/uploads ] || \ + install -d -o $owner -g $group -m 0750 "/var/cache/lighttpd/uploads" + [ -d /var/log/lighttpd ] || \ + install -d -o $owner -g $group -m 0750 "/var/log/lighttpd" + [ -d /var/run/lighttpd ] || \ + install -d -o $owner -g $group -m 0750 "/var/run/lighttpd" +fi + +. /lib/lsb/init-functions + +case "$1" in + start) + check_syntax + log_daemon_msg "Starting $DESC" $NAME + if ! start-stop-daemon --start --oknodo --quiet \ + --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS + then + log_end_msg 1 + else + log_end_msg 0 + fi + ;; + stop) + log_daemon_msg "Stopping $DESC" $NAME + if start-stop-daemon --stop --retry 30 --oknodo --quiet \ + --pidfile $PIDFILE --exec $DAEMON + then + rm -f $PIDFILE + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + reload|force-reload) + check_syntax + log_daemon_msg "Reloading $DESC configuration" $NAME + if start-stop-daemon --stop --signal INT --quiet \ + --pidfile $PIDFILE --exec $DAEMON \ + --retry=TERM/60/KILL/5 + then + rm $PIDFILE + if start-stop-daemon --start --quiet \ + --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS ; then + log_end_msg 0 + else + log_end_msg 1 + fi + else + log_end_msg 1 + fi + ;; + reopen-logs) + log_daemon_msg "Reopening $DESC logs" $NAME + if start-stop-daemon --stop --signal HUP --oknodo --quiet \ + --pidfile $PIDFILE --exec $DAEMON + then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; + restart) + check_syntax + $0 stop + $0 start + ;; + configtest|testconfig) + check_syntax + ;; + status) + status_of_proc -p "$PIDFILE" "$DAEMON" lighttpd && exit 0 || exit $? + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|reopen-logs|configtest|status}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/lighttpd/conf-available/05-auth.conf b/lighttpd/conf-available/05-auth.conf new file mode 100644 index 0000000..6c14e47 --- /dev/null +++ b/lighttpd/conf-available/05-auth.conf @@ -0,0 +1,25 @@ +# /usr/share/doc/lighttpd/authentication.txt.gz + +server.modules += ( "mod_auth" ) + +# auth.backend = "plain" +# auth.backend.plain.userfile = "lighttpd.user" +# auth.backend.plain.groupfile = "lighttpd.group" + +# auth.backend.ldap.hostname = "localhost" +# auth.backend.ldap.base-dn = "dc=my-domain,dc=com" +# auth.backend.ldap.filter = "(uid=$)" + +# auth.require = ( "/server-status" => +# ( +# "method" => "digest", +# "realm" => "download archiv", +# "require" => "group=www|user=jan|host=192.168.2.10" +# ), +# "/server-info" => +# ( +# "method" => "digest", +# "realm" => "download archiv", +# "require" => "group=www|user=jan|host=192.168.2.10" +# ) +# ) diff --git a/lighttpd/conf-available/10-accesslog.conf b/lighttpd/conf-available/10-accesslog.conf new file mode 100644 index 0000000..552a762 --- /dev/null +++ b/lighttpd/conf-available/10-accesslog.conf @@ -0,0 +1,3 @@ +server.modules += ( "mod_accesslog" ) + +accesslog.filename = "/var/log/lighttpd/access.log" diff --git a/lighttpd/conf-available/10-cgi.conf b/lighttpd/conf-available/10-cgi.conf new file mode 100644 index 0000000..e4eaf9a --- /dev/null +++ b/lighttpd/conf-available/10-cgi.conf @@ -0,0 +1,16 @@ +# /usr/share/doc/lighttpd/cgi.txt + +server.modules += ( "mod_cgi" ) + +$HTTP["url"] =~ "^/cgi-bin/" { + cgi.assign = ( "" => "" ) + alias.url += ( "/cgi-bin/" => "/usr/lib/cgi-bin/" ) +} + +## Warning this represents a security risk, as it allow to execute any file +## with a .pl/.py even outside of /usr/lib/cgi-bin. +# +#cgi.assign = ( +# ".pl" => "/usr/bin/perl", +# ".py" => "/usr/bin/python", +#) diff --git a/lighttpd/conf-available/10-dir-listing.conf b/lighttpd/conf-available/10-dir-listing.conf new file mode 100644 index 0000000..10e32e8 --- /dev/null +++ b/lighttpd/conf-available/10-dir-listing.conf @@ -0,0 +1,2 @@ +dir-listing.encoding = "utf-8" +server.dir-listing = "enable" diff --git a/lighttpd/conf-available/10-evasive.conf b/lighttpd/conf-available/10-evasive.conf new file mode 100644 index 0000000..6c61733 --- /dev/null +++ b/lighttpd/conf-available/10-evasive.conf @@ -0,0 +1 @@ +server.modules += ( "mod_evasive" ) diff --git a/lighttpd/conf-available/10-evhost.conf b/lighttpd/conf-available/10-evhost.conf new file mode 100644 index 0000000..2c33448 --- /dev/null +++ b/lighttpd/conf-available/10-evhost.conf @@ -0,0 +1,5 @@ +# http://redmine.lighttpd.net/wiki/1/Docs:ModEVhost + +server.modules += ( "mod_evhost" ) + +evhost.path-pattern = "/srv/%_/htdocs" diff --git a/lighttpd/conf-available/10-expire.conf b/lighttpd/conf-available/10-expire.conf new file mode 100644 index 0000000..634236a --- /dev/null +++ b/lighttpd/conf-available/10-expire.conf @@ -0,0 +1,3 @@ +# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModExpire + +server.modules += ( "mod_expire" ) diff --git a/lighttpd/conf-available/10-fastcgi.conf b/lighttpd/conf-available/10-fastcgi.conf new file mode 100644 index 0000000..7862ed9 --- /dev/null +++ b/lighttpd/conf-available/10-fastcgi.conf @@ -0,0 +1,4 @@ +# /usr/share/doc/lighttpd/fastcgi.txt.gz +# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions#mod_fastcgi-fastcgi + +server.modules += ( "mod_fastcgi" ) diff --git a/lighttpd/conf-available/10-flv-streaming.conf b/lighttpd/conf-available/10-flv-streaming.conf new file mode 100644 index 0000000..d8317c0 --- /dev/null +++ b/lighttpd/conf-available/10-flv-streaming.conf @@ -0,0 +1 @@ +server.modules += ( "mod_flv_streaming" ) diff --git a/lighttpd/conf-available/10-no-www.conf b/lighttpd/conf-available/10-no-www.conf new file mode 100644 index 0000000..09b163c --- /dev/null +++ b/lighttpd/conf-available/10-no-www.conf @@ -0,0 +1,3 @@ +$HTTP["host"] =~ "^www\.(.*)" { + url.redirect = ( "^/(.*)" => "http://%1/$1" ) +} diff --git a/lighttpd/conf-available/10-proxy.conf b/lighttpd/conf-available/10-proxy.conf new file mode 100644 index 0000000..1e95945 --- /dev/null +++ b/lighttpd/conf-available/10-proxy.conf @@ -0,0 +1,25 @@ +# /usr/share/doc/lighttpd/proxy.txt + +server.modules += ( "mod_proxy" ) + +## Balance algorithm, possible values are: "hash", "round-robin" or "fair" (default) +# proxy.balance = "hash" + + +## Redirect all queries to files ending with ".php" to 192.168.0.101:80 +#proxy.server = ( ".php" => +# ( +# ( "host" => "192.168.0.101", +# "port" => 80 +# ) +# ) +# ) + +## Redirect all connections on www.example.com to 10.0.0.1{0,1,2,3} +#$HTTP["host"] == "www.example.com" { +# proxy.balance = "hash" +# proxy.server = ( "" => ( ( "host" => "10.0.0.10" ), +# ( "host" => "10.0.0.11" ), +# ( "host" => "10.0.0.12" ), +# ( "host" => "10.0.0.13" ) ) ) +#} diff --git a/lighttpd/conf-available/10-rewrite.conf b/lighttpd/conf-available/10-rewrite.conf new file mode 100644 index 0000000..f82fc1a --- /dev/null +++ b/lighttpd/conf-available/10-rewrite.conf @@ -0,0 +1,4 @@ +# /usr/share/doc/lighttpd/rewrite.txt +# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ConfigurationOptions#mod_rewrite-rewriting + +server.modules += ( "mod_rewrite" ) diff --git a/lighttpd/conf-available/10-rrdtool.conf b/lighttpd/conf-available/10-rrdtool.conf new file mode 100644 index 0000000..0a49c98 --- /dev/null +++ b/lighttpd/conf-available/10-rrdtool.conf @@ -0,0 +1,10 @@ +# /usr/share/doc/lighttpd/rrdtool.txt + +server.modules += ( "mod_rrdtool" ) + +## path to the rrdtool binary +rrdtool.binary = "/usr/bin/rrdtool" + +## file to store the rrd database, will be created by lighttpd +rrdtool.db-name = "/var/www/lighttpd.rrd" + diff --git a/lighttpd/conf-available/10-simple-vhost.conf b/lighttpd/conf-available/10-simple-vhost.conf new file mode 100644 index 0000000..7dfa1ca --- /dev/null +++ b/lighttpd/conf-available/10-simple-vhost.conf @@ -0,0 +1,11 @@ +# /usr/share/doc/lighttpd/simple-vhost.txt + +server.modules += ( "mod_simple_vhost" ) + +## The document root of a virtual host is document-root = +## simple-vhost.server-root + $HTTP["host"] + simple-vhost.document-root +simple-vhost.server-root = "/srv" +simple-vhost.document-root = "htdocs" + +## the default host if no host is sent +simple-vhost.default-host = "www.example.com" diff --git a/lighttpd/conf-available/10-sockproxy.conf b/lighttpd/conf-available/10-sockproxy.conf new file mode 100644 index 0000000..1582536 --- /dev/null +++ b/lighttpd/conf-available/10-sockproxy.conf @@ -0,0 +1,14 @@ +server.modules += ( "mod_sockproxy" ) + +## Balance algorithm, possible values: +## "hash", "round-robin", "sticky", "fair" (default) +#sockproxy.balance = "hash" + +## Transparent socket proxy of all connections to 192.168.0.101:10000 +#sockproxy.server = ( "" => +# ( +# ( "host" => "192.168.0.101", +# "port" => 10000 +# ) +# ) +# ) diff --git a/lighttpd/conf-available/10-ssi.conf b/lighttpd/conf-available/10-ssi.conf new file mode 100644 index 0000000..55d2aba --- /dev/null +++ b/lighttpd/conf-available/10-ssi.conf @@ -0,0 +1,5 @@ +# /usr/share/doc/lighttpd/ssi.txt + +server.modules += ( "mod_ssi" ) + +ssi.extension = ( ".shtml" ) diff --git a/lighttpd/conf-available/10-ssl.conf b/lighttpd/conf-available/10-ssl.conf new file mode 100644 index 0000000..b090c9b --- /dev/null +++ b/lighttpd/conf-available/10-ssl.conf @@ -0,0 +1,9 @@ +# /usr/share/doc/lighttpd/ssl.txt + +server.modules += ( "mod_openssl" ) + +$SERVER["socket"] == "0.0.0.0:443" { + ssl.engine = "enable" + ssl.pemfile = "/etc/lighttpd/server.pem" + ssl.cipher-list = "HIGH" +} diff --git a/lighttpd/conf-available/10-status.conf b/lighttpd/conf-available/10-status.conf new file mode 100644 index 0000000..2859372 --- /dev/null +++ b/lighttpd/conf-available/10-status.conf @@ -0,0 +1,15 @@ +# /usr/share/doc/lighttpd/status.txt +# http://trac.lighttpd.net/trac/wiki/Docs%3AModStatus + +server.modules += ( "mod_status" ) + +# status.status-url = "/server-status" + +# status.config-url = "/server-config" + +## relative URL for a plain-text page containing the internal statistics +# status.statistics-url = "/server-statistics" + +## add JavaScript which allows client-side sorting for the connection overview +## default: enable +# status.enable-sort = "disable" diff --git a/lighttpd/conf-available/10-userdir.conf b/lighttpd/conf-available/10-userdir.conf new file mode 100644 index 0000000..3507eaf --- /dev/null +++ b/lighttpd/conf-available/10-userdir.conf @@ -0,0 +1,13 @@ +## The userdir module provides a simple way to link user-based directories into +## the global namespace of the webserver. +## +# /usr/share/doc/lighttpd/userdir.txt + +server.modules += ( "mod_userdir" ) + +## the subdirectory of a user's home dir which should be accessible +## under http://$host/~$user +userdir.path = "public_html" + +## The users whose home directories should not be accessible +userdir.exclude-user = ( "root", "postmaster" ) diff --git a/lighttpd/conf-available/10-usertrack.conf b/lighttpd/conf-available/10-usertrack.conf new file mode 100644 index 0000000..018b5f4 --- /dev/null +++ b/lighttpd/conf-available/10-usertrack.conf @@ -0,0 +1 @@ +server.modules += ( "mod_usertrack" ) diff --git a/lighttpd/conf-available/11-extforward.conf b/lighttpd/conf-available/11-extforward.conf new file mode 100644 index 0000000..cf06e82 --- /dev/null +++ b/lighttpd/conf-available/11-extforward.conf @@ -0,0 +1,6 @@ +# -*- depends: accesslog -*- + +server.modules += ( "mod_extforward" ) + +# extforward.headers = ("X-Cluster-Client-Ip") +# extforward.forwarder = ("10.0.0.232" => "trust") diff --git a/lighttpd/conf-available/15-fastcgi-php.conf b/lighttpd/conf-available/15-fastcgi-php.conf new file mode 100644 index 0000000..cea11c2 --- /dev/null +++ b/lighttpd/conf-available/15-fastcgi-php.conf @@ -0,0 +1,20 @@ +# -*- depends: fastcgi -*- +# /usr/share/doc/lighttpd/fastcgi.txt.gz +# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions#mod_fastcgi-fastcgi + +## Start an FastCGI server for php (needs the php5-cgi package) +fastcgi.server += ( ".php" => + (( + "bin-path" => "/usr/bin/php-cgi", + "socket" => "/var/run/lighttpd/php.socket", + "max-procs" => 1, + "bin-environment" => ( + "PHP_FCGI_CHILDREN" => "4", + "PHP_FCGI_MAX_REQUESTS" => "10000" + ), + "bin-copy-environment" => ( + "PATH", "SHELL", "USER" + ), + "broken-scriptfilename" => "enable" + )) +) diff --git a/lighttpd/conf-available/89-dump1090.conf b/lighttpd/conf-available/89-dump1090.conf new file mode 100644 index 0000000..17b6251 --- /dev/null +++ b/lighttpd/conf-available/89-dump1090.conf @@ -0,0 +1,18 @@ +# 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. + +url.redirect += ( + "^/dump1090/$" => "/dump1090/gmap.html", + "^/dump1090$" => "/dump1090/gmap.html" +) + +alias.url += ( + "/dump1090/data/" => "/run/dump1090-mutability/", + "/dump1090/" => "/usr/share/dump1090-mutability/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" diff --git a/lighttpd/conf-available/90-debian-doc.conf b/lighttpd/conf-available/90-debian-doc.conf new file mode 100644 index 0000000..0eb4cc2 --- /dev/null +++ b/lighttpd/conf-available/90-debian-doc.conf @@ -0,0 +1,15 @@ +#### handle Debian Policy Manual, Section 11.5. urls +## by default allow them only from localhost +$HTTP["remoteip"] =~ "^127\.0\.0\.1$|^::1$" { + alias.url += ( + "/cgi-bin/" => "/usr/lib/cgi-bin/", + "/doc/" => "/usr/share/doc/", + "/images/" => "/usr/share/images/" + ) + $HTTP["url"] =~ "^/doc/|^/images/" { + dir-listing.activate = "enable" + } + $HTTP["url"] =~ "^/cgi-bin/" { + cgi.assign = ( "" => "" ) + } +} diff --git a/lighttpd/conf-available/99-unconfigured.conf b/lighttpd/conf-available/99-unconfigured.conf new file mode 100644 index 0000000..1d0679a --- /dev/null +++ b/lighttpd/conf-available/99-unconfigured.conf @@ -0,0 +1,3 @@ +# override prior index-file.name directive +# to fall back to default index.lighttpd.html +index-file.names := ( "index.php", "index.html", "index.lighttpd.html" ) diff --git a/lighttpd/conf-available/README b/lighttpd/conf-available/README new file mode 100644 index 0000000..08679f7 --- /dev/null +++ b/lighttpd/conf-available/README @@ -0,0 +1,22 @@ +ligghttpd Configuration under Debian GNU/Linux +============================================== + +Files and Directories in /etc/lighttpd: +--------------------------------------- + +lighttpd.conf: + main configuration file + +conf-available/ + This directory contains a series of .conf files. These files contain + configuration directives necessary to load and run webserver modules. + If you want to create your own files they names should be + build as nn-name.conf where "nn" is two digit number (number + is used to find order for loading files) + +conf-enabled/ + To actually enable a module for lighttpd, it is necessary to create a + symlink in this directory to the .conf file in conf-available/. + +Enabling and disabling modules could be done by provided +/usr/sbin/lighty-enable-mod and /usr/sbin/lighty-disable-mod scripts. diff --git a/lighttpd/conf-enabled/89-dump1090.conf b/lighttpd/conf-enabled/89-dump1090.conf new file mode 120000 index 0000000..6215787 --- /dev/null +++ b/lighttpd/conf-enabled/89-dump1090.conf @@ -0,0 +1 @@ +../conf-available/89-dump1090.conf \ No newline at end of file diff --git a/lighttpd/lighttpd.conf b/lighttpd/lighttpd.conf new file mode 100644 index 0000000..ea04c48 --- /dev/null +++ b/lighttpd/lighttpd.conf @@ -0,0 +1,52 @@ +server.modules = ( + "mod_indexfile", + "mod_access", + "mod_alias", + "mod_redirect", +) + +server.document-root = "/var/www/html" +server.upload-dirs = ( "/var/cache/lighttpd/uploads" ) +server.errorlog = "/var/log/lighttpd/error.log" +server.pid-file = "/var/run/lighttpd.pid" +server.username = "www-data" +server.groupname = "www-data" +server.port = 80 + +# strict parsing and normalization of URL for consistency and security +# https://redmine.lighttpd.net/projects/lighttpd/wiki/Server_http-parseoptsDetails +# (might need to explicitly set "url-path-2f-decode" = "disable" +# if a specific application is encoding URLs inside url-path) +server.http-parseopts = ( + "header-strict" => "enable",# default + "host-strict" => "enable",# default + "host-normalize" => "enable",# default + "url-normalize-unreserved"=> "enable",# recommended highly + "url-normalize-required" => "enable",# recommended + "url-ctrls-reject" => "enable",# recommended + "url-path-2f-decode" => "enable",# recommended highly (unless breaks app) + #"url-path-2f-reject" => "enable", + "url-path-dotseg-remove" => "enable",# recommended highly (unless breaks app) + #"url-path-dotseg-reject" => "enable", + #"url-query-20-plus" => "enable",# consistency in query string +) + +index-file.names = ( "index.php", "index.html" ) +url.access-deny = ( "~", ".inc" ) +static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) + +compress.cache-dir = "/var/cache/lighttpd/compress/" +compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" ) + +# default listening port for IPv6 falls back to the IPv4 port +## Use ipv6 if available +#include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port +include_shell "/usr/share/lighttpd/create-mime.conf.pl" +include "/etc/lighttpd/conf-enabled/*.conf" + +#server.compat-module-load = "disable" +server.modules += ( + "mod_compress", + "mod_dirlisting", + "mod_staticfile", +) diff --git a/logrotate.d/dump1090-mutability b/logrotate.d/dump1090-mutability new file mode 100644 index 0000000..0a4f6ad --- /dev/null +++ b/logrotate.d/dump1090-mutability @@ -0,0 +1,5 @@ +/var/log/dump1090-mutability.log { + weekly + rotate 4 + copytruncate +} diff --git a/logrotate.d/lighttpd b/logrotate.d/lighttpd new file mode 100644 index 0000000..4971adb --- /dev/null +++ b/logrotate.d/lighttpd @@ -0,0 +1,16 @@ +/var/log/lighttpd/*.log { + weekly + missingok + rotate 12 + compress + delaycompress + notifempty + sharedscripts + postrotate + if [ -x /usr/sbin/invoke-rc.d ]; then \ + invoke-rc.d lighttpd reopen-logs > /dev/null 2>&1; \ + else \ + /etc/init.d/lighttpd reopen-logs > /dev/null 2>&1; \ + fi; \ + endscript +} diff --git a/nginx/sites-available/dump1090-mutability b/nginx/sites-available/dump1090-mutability new file mode 100644 index 0000000..6ab9290 --- /dev/null +++ b/nginx/sites-available/dump1090-mutability @@ -0,0 +1,16 @@ +# 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. +# +server{ + rewrite ^/dump1090/$ /dump1090/gmap.html permanent; + rewrite ^/dump1090$ /dump1090/gmap.html permanent; + + location /dump1090/ { + alias /usr/share/dump1090-mutability/html/; + } + location /dump1090/data/ { + alias /run/dump1090-mutability/; + } +} + diff --git a/passwd b/passwd index 98b67f9..a2eadfa 100644 --- a/passwd +++ b/passwd @@ -56,3 +56,4 @@ gnome-initial-setup:x:123:65534::/run/gnome-initial-setup/:/bin/false systemd-coredump:x:997:997:systemd Core Dumper:/:/sbin/nologin tcpdump:x:132:145::/nonexistent:/usr/sbin/nologin nvidia-persistenced:x:133:146:NVIDIA Persistence Daemon,,,:/nonexistent:/sbin/nologin +dump1090:x:134:65534::/usr/share/dump1090-mutability:/usr/sbin/nologin diff --git a/passwd- b/passwd- index 8a5b3ac..a2eadfa 100644 --- a/passwd- +++ b/passwd- @@ -55,4 +55,5 @@ gdm:x:121:129:Gnome Display Manager:/var/lib/gdm3:/bin/false gnome-initial-setup:x:123:65534::/run/gnome-initial-setup/:/bin/false systemd-coredump:x:997:997:systemd Core Dumper:/:/sbin/nologin tcpdump:x:132:145::/nonexistent:/usr/sbin/nologin -nvidia-persistenced:x:133:146::/nonexistent:/sbin/nologin +nvidia-persistenced:x:133:146:NVIDIA Persistence Daemon,,,:/nonexistent:/sbin/nologin +dump1090:x:134:65534::/usr/share/dump1090-mutability:/usr/sbin/nologin diff --git a/rc0.d/K01dump1090-mutability b/rc0.d/K01dump1090-mutability new file mode 120000 index 0000000..fe89c67 --- /dev/null +++ b/rc0.d/K01dump1090-mutability @@ -0,0 +1 @@ +../init.d/dump1090-mutability \ No newline at end of file diff --git a/rc0.d/K01lighttpd b/rc0.d/K01lighttpd new file mode 120000 index 0000000..e7c27d4 --- /dev/null +++ b/rc0.d/K01lighttpd @@ -0,0 +1 @@ +../init.d/lighttpd \ No newline at end of file diff --git a/rc1.d/K01dump1090-mutability b/rc1.d/K01dump1090-mutability new file mode 120000 index 0000000..fe89c67 --- /dev/null +++ b/rc1.d/K01dump1090-mutability @@ -0,0 +1 @@ +../init.d/dump1090-mutability \ No newline at end of file diff --git a/rc1.d/K01lighttpd b/rc1.d/K01lighttpd new file mode 120000 index 0000000..e7c27d4 --- /dev/null +++ b/rc1.d/K01lighttpd @@ -0,0 +1 @@ +../init.d/lighttpd \ No newline at end of file diff --git a/rc2.d/S02dump1090-mutability b/rc2.d/S02dump1090-mutability new file mode 120000 index 0000000..fe89c67 --- /dev/null +++ b/rc2.d/S02dump1090-mutability @@ -0,0 +1 @@ +../init.d/dump1090-mutability \ No newline at end of file diff --git a/rc2.d/S04lighttpd b/rc2.d/S04lighttpd new file mode 120000 index 0000000..e7c27d4 --- /dev/null +++ b/rc2.d/S04lighttpd @@ -0,0 +1 @@ +../init.d/lighttpd \ No newline at end of file diff --git a/rc3.d/S02dump1090-mutability b/rc3.d/S02dump1090-mutability new file mode 120000 index 0000000..fe89c67 --- /dev/null +++ b/rc3.d/S02dump1090-mutability @@ -0,0 +1 @@ +../init.d/dump1090-mutability \ No newline at end of file diff --git a/rc3.d/S04lighttpd b/rc3.d/S04lighttpd new file mode 120000 index 0000000..e7c27d4 --- /dev/null +++ b/rc3.d/S04lighttpd @@ -0,0 +1 @@ +../init.d/lighttpd \ No newline at end of file diff --git a/rc4.d/S02dump1090-mutability b/rc4.d/S02dump1090-mutability new file mode 120000 index 0000000..fe89c67 --- /dev/null +++ b/rc4.d/S02dump1090-mutability @@ -0,0 +1 @@ +../init.d/dump1090-mutability \ No newline at end of file diff --git a/rc4.d/S04lighttpd b/rc4.d/S04lighttpd new file mode 120000 index 0000000..e7c27d4 --- /dev/null +++ b/rc4.d/S04lighttpd @@ -0,0 +1 @@ +../init.d/lighttpd \ No newline at end of file diff --git a/rc5.d/S02dump1090-mutability b/rc5.d/S02dump1090-mutability new file mode 120000 index 0000000..fe89c67 --- /dev/null +++ b/rc5.d/S02dump1090-mutability @@ -0,0 +1 @@ +../init.d/dump1090-mutability \ No newline at end of file diff --git a/rc5.d/S04lighttpd b/rc5.d/S04lighttpd new file mode 120000 index 0000000..e7c27d4 --- /dev/null +++ b/rc5.d/S04lighttpd @@ -0,0 +1 @@ +../init.d/lighttpd \ No newline at end of file diff --git a/rc6.d/K01dump1090-mutability b/rc6.d/K01dump1090-mutability new file mode 120000 index 0000000..fe89c67 --- /dev/null +++ b/rc6.d/K01dump1090-mutability @@ -0,0 +1 @@ +../init.d/dump1090-mutability \ No newline at end of file diff --git a/rc6.d/K01lighttpd b/rc6.d/K01lighttpd new file mode 120000 index 0000000..e7c27d4 --- /dev/null +++ b/rc6.d/K01lighttpd @@ -0,0 +1 @@ +../init.d/lighttpd \ No newline at end of file diff --git a/shadow b/shadow index e304057..78b181d 100644 --- a/shadow +++ b/shadow @@ -56,3 +56,4 @@ gnome-initial-setup:*:18107:0:99999:7::: systemd-coredump:!!:18107:::::: tcpdump:*:18219:0:99999:7::: nvidia-persistenced:*:18219:0:99999:7::: +dump1090:*:18302:0:99999:7::: diff --git a/shadow- b/shadow- index e1e39c2..78b181d 100644 --- a/shadow- +++ b/shadow- @@ -1,4 +1,4 @@ -root:$6$mtUY6ynL$SeITPUyE6SpPvYJw2lv.Ky3fHWdwGGv9Es/h9LBH5DLpUNWpsUPlgiddcIyNhxnJbm8d6nKfIho/QrpxLXItN1:17321:0:99999:7::: +root:$6$70CkT4tIWK7Q4PX4$3X.4n4bpKpxjwxySDj4D0pRDFNFn5UMkMR1la24ed2O/zsD0K16g791lgl2qSzO6vlJVa2LxPmQaBPlsEx6NS1:18274:0:99999:7::: daemon:*:17212:0:99999:7::: bin:*:17212:0:99999:7::: sys:*:17212:0:99999:7::: @@ -43,7 +43,7 @@ postfix:*:17326:0:99999:7::: davfs2:*:17416:0:99999:7::: mongodb:*:17457:0:99999:7::: trezord:!:17738:::::: -susi:$6$.IwGferMLJcbHcWe$MQbS1FTQt2G/o/Vmv.mA.HAJJT1nyo2ufeCLfeTeOz0K3VUhBZrszhnthqqPjxSc2ko4CUpWjwzPLUvNkEjgl/:18135:0:99999:7::: +susi:$6$wDctX5LgQ4w9aOZY$ApMn33xfdXzGk6asOtUTuIZv1fc3b9RnOBFol6OR8Cr45/7auYAZN5Vf4hzF7Ayk3A0rCCp1HUfJTmU3tZgs11:18274:0:99999:7::: bitcoin:*:17765:0:99999:7::: cups-pk-helper:*:17767:0:99999:7::: ntp:*:17771:0:99999:7::: @@ -56,3 +56,4 @@ gnome-initial-setup:*:18107:0:99999:7::: systemd-coredump:!!:18107:::::: tcpdump:*:18219:0:99999:7::: nvidia-persistenced:*:18219:0:99999:7::: +dump1090:*:18302:0:99999:7::: diff --git a/systemd/system/multi-user.target.wants/lighttpd.service b/systemd/system/multi-user.target.wants/lighttpd.service new file mode 120000 index 0000000..2babeaf --- /dev/null +++ b/systemd/system/multi-user.target.wants/lighttpd.service @@ -0,0 +1 @@ +/lib/systemd/system/lighttpd.service \ No newline at end of file diff --git a/ufw/applications.d/lighttpd b/ufw/applications.d/lighttpd new file mode 100644 index 0000000..8beff3f --- /dev/null +++ b/ufw/applications.d/lighttpd @@ -0,0 +1,14 @@ +[Lighttpd HTTP] +title=Web Server (lighttpd, HTTP) +description=A fast webserver with minimal memory footprint +ports=80/tcp + +[Lighttpd HTTPS] +title=Web Server (lighttpd, HTTPS) +description=A fast webserver with minimal memory footprint +ports=443/tcp + +[Lighttpd Full] +title=Web Server (lighttpd, HTTP + HTTPS) +description=A fast webserver with minimal memory footprint +ports=80,443/tcp -- 2.43.0