1
0
Fork 0
mirror of https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git synced 2025-02-17 00:44:28 +01:00
docker-adsb-ultrafeeder/rootfs/etc/services.d/prometheus-readsb/run

15 lines
369 B
Text
Raw Normal View History

2023-03-28 22:01:27 +02:00
#!/usr/bin/with-contenv bash
2023-04-08 23:07:11 +02:00
# shellcheck shell=bash disable=SC1091
2023-03-28 22:01:27 +02:00
2023-04-08 23:07:11 +02:00
source /scripts/common
if chk_enabled "$PROMETHEUS_ENABLE"; then
2023-03-28 22:01:27 +02:00
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