diff --git a/Dockerfile b/Dockerfile index 1c10681..cefbc5c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,7 +40,8 @@ ENV BASESTATIONPORT="30003" \ MYSQLPORT=3306 \ S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \ TZ=UTC \ - WEBUSER=flightairmap + WEBUSER=flightairmap \ + QUIET_FAM=true SHELL ["/bin/bash", "-o", "pipefail", "-c"] diff --git a/README.md b/README.md index eeff81d..be6fdd2 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,7 @@ of this parameter has the format `=`. | `FAM_INSTALLPASSWORD` | Sets the `$globalInstallPassword` variable in `require/settings.php`. The password to access the install area. If not given, a randomly password will be generated and used. To obtain the generated password, you can issue the command `docker exec flightairmap cat /var/www/flightairmap/htdocs/require/settings.php \| grep globalInstallPassword`. | `unset` | Optional | | `BASESTATIONHOST` | You can specify the IP or hostname of a host/container running `readsb` or `dump1090`. See [sdre-enthusiasts/docker-readsb-protobuf](https://github.com/sdr-enthusiasts/docker-readsb-protobuf/). If given, FlightAirMap will pull ADS-B data from the specified host/container. Without this, you'll need to set up your own sources via the install area. | `unset` | Optional | | `BASESTATIONPORT` | If your `readsb` or `dump1090` is running on a non-standard TCP port, you can change it here. | `30003` | Optional | +| `QUIET_FAM` | If set to `true`, will suppress the output of FAM in the logs. | `true` | Optional | | `FAM_GLOBALSITENAME` | Sets the `$globalName` variable in `require/settings.php`.The name of your site | `My FlightAirMap Site` | Optional | | `FAM_LANGUAGE` | Sets the `$globalLanguage` variable in `require/settings.php`. Interface language. Can be set to `EN`, `DE` or `FR`. | `EN` | Optional | | `FAM_MAPPROVIDER` | Sets the `$globalMapProvider` variable in `require/settings.php`. Can be `Mapbox`, `OpenStreetMap`, `MapQuest-OSM` or `MapQuest-Aerial` | `OpenStreetMap` | Optional | diff --git a/rootfs/etc/s6-overlay/scripts/daemon-spotter b/rootfs/etc/s6-overlay/scripts/daemon-spotter index 0a5c885..3949762 100755 --- a/rootfs/etc/s6-overlay/scripts/daemon-spotter +++ b/rootfs/etc/s6-overlay/scripts/daemon-spotter @@ -4,4 +4,21 @@ source /scripts/common s6wrap=(s6wrap --quiet --prepend="$(basename "$0")" --timestamps --args) -"${s6wrap[@]}" s6-setuidgid "$WEBUSER" php /var/www/flightairmap/htdocs/scripts/daemon-spotter.php +if chk_enabled $QUIET_FAM; then + "${s6wrap[@]}" s6-setuidgid "$WEBUSER" php /var/www/flightairmap/htdocs/scripts/daemon-spotter.php 2>&1 | \ + stdbuf -oL awk '! /\\o\//' | \ + stdbuf -oL awk '! /DATA : /' | \ + stdbuf -oL awk '! /New flight.../' | \ + stdbuf -oL awk '! /New aircraft hex/' | \ + stdbuf -oL awk '! /in archive DB/' | \ + stdbuf -oL awk '! /already in DB/' | \ + stdbuf -oL awk '! /Getting schedule info/' | \ + stdbuf -oL awk '! /old values and update latest data/' | \ + stdbuf -oL awk '! /Check if aircraft is already in DB/' | \ + stdbuf -oL awk '! /get arrival\/departure airport/' | \ + stdbuf -oL awk '! /Deleting Live Spotter/' | \ + stdbuf -oL awk '! /Calculated Speed/' | \ + stdbuf -oL awk '{print $0}' +else + "${s6wrap[@]}" s6-setuidgid "$WEBUSER" php /var/www/flightairmap/htdocs/scripts/daemon-spotter.php +fi