1
0
Fork 0
mirror of https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git synced 2024-11-27 00:00:10 +00:00
docker-adsb-ultrafeeder/rootfs/etc/services.d/prometheus-readsb/run
2023-03-28 16:01:27 -04:00

12 lines
326 B
Text

#!/usr/bin/with-contenv bash
#shellcheck shell=bash
if [[ -n "$PROMETHEUS_ENABLE" ]]; then
while [[ ! -f /run/readsb-prometheus.prom ]]
do
sleep 1
done
echo -e "HTTP/1.1 200 OK\nContent-Type: text/plain\n\n$(cat /run/readsb-prometheus.prom)" | ncat -l 9274 > /dev/null 2>&1
else
sleep infinity
fi