Skip to content

Commit

Permalink
more log quieting
Browse files Browse the repository at this point in the history
  • Loading branch information
fredclausen committed Nov 6, 2023
1 parent c1559c4 commit 446c2b7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 9 additions & 1 deletion rootfs/etc/s6-overlay/scripts/daemon-acars
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,12 @@
source /scripts/common

s6wrap=(s6wrap --quiet --prepend="$(basename "$0")" --timestamps --args)
"${s6wrap[@]}" s6-setuidgid "$WEBUSER" php /var/www/flightairmap/htdocs/scripts/daemon-acars.php
if chk_enabled $QUIET_FAM; then
# shut up the logging of acars messages if it's enabled and it's a normal looking message
"${s6wrap[@]}" s6-setuidgid "$WEBUSER" php /var/www/flightairmap/htdocs/scripts/daemon-acars.php 2>&1 | \
stdbuf -oL awk '! /freq/' | \
stdbuf -oL sed -e 's/\n\n/\n/g' | \
stdbuf -oL awk '{print $0}'
else
"${s6wrap[@]}" s6-setuidgid "$WEBUSER" php /var/www/flightairmap/htdocs/scripts/daemon-acars.php
fi
2 changes: 2 additions & 0 deletions rootfs/etc/s6-overlay/scripts/daemon-spotter
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ if chk_enabled $QUIET_FAM; then
stdbuf -oL awk '! /Check Country/' | \
stdbuf -oL awk '! /Too much distance in short time/' | \
stdbuf -oL awk '! /Time :/' | \
stdbuf -oL awk '! /No Airport near/' | \
stdbuf -oL sed -e 's/\n\n/\n/g' | \
stdbuf -oL awk '{print $0}'
else
# shellcheck disable=SC1091,SC2086,SC2016
Expand Down

0 comments on commit 446c2b7

Please sign in to comment.