1
0
Fork 0
mirror of https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git synced 2024-10-16 05:50:44 +00:00

Allow overriding the Prometheus port (#64)

The docs suggest you can do this, but the code does not allow for it.
This fixes that so you can specify your own port.

I've spotted an error in the docs too, MR for that repo will be along
shortly.
This commit is contained in:
kx1t 2024-02-27 12:13:28 -05:00 committed by GitHub
commit 10ca792401
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,7 +9,7 @@ if chk_enabled "$PROMETHEUS_ENABLE"; then
sleep 1
done
trap "pkill -P $$ || true; s6wrap --timestamps --prepend=prometheus-readsb --quiet --args echo 'service stopping'; exit 0" SIGTERM SIGINT SIGHUP SIGQUIT
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 &
echo -e "HTTP/1.1 200 OK\nContent-Type: text/plain\n\n$(cat /run/readsb-prometheus.prom)" | ncat -l "${PROMETHEUSPORT:-9274}" > /dev/null 2>&1 &
wait
else
exec sleep infinity