Files
homeassistant-addons/adsb-multi-portal-feeder/root/etc/s6-overlay/s6-rc.d/fr24feed/run
T

19 lines
667 B
Plaintext

#!/command/with-contenv bash
if [ "$SERVICE_ENABLE_FR24FEED" != "false" ]; then
set -eo pipefail
# enforce ulimit like docker <=22 to prevent OOM issues
# see https://github.com/Thom-x/docker-fr24feed-piaware-dump1090/issues/107
if [ -n "$FR24FEED_ULIMIT_N" ]; then
echo "[fr24feed] Setting ulimit -n to $FR24FEED_ULIMIT_N"
ulimit -n "$FR24FEED_ULIMIT_N"
else
echo "[fr24feed] No adjustment of ulimit -n"
fi
/fr24feed/fr24feed/fr24feed 2>&1 | mawk -W interactive '{printf "%c[34m[fr24feed]%c[0m %s\n", 27, 27, $0}'
# awk -W interactive ... (prefix log messages with color and "[fr24feed]")
else
tail -f /dev/null
fi