mirror of
https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git
synced 2024-11-25 07:10:10 +00:00
75ee015381
alias can only be used in interactive shell scripts, replace with bash array var
16 lines
542 B
Text
16 lines
542 B
Text
#!/usr/bin/with-contenv bash
|
|
# shellcheck shell=bash disable=SC1091
|
|
|
|
source /scripts/common
|
|
|
|
if chk_enabled "$PROMETHEUS_ENABLE"; then
|
|
while [[ ! -f /run/readsb-prometheus.prom ]]
|
|
do
|
|
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 &
|
|
wait
|
|
else
|
|
exec sleep infinity
|
|
fi
|