From 4a2df580dd3c31e1531da1ef1a9ff44143fc74cb Mon Sep 17 00:00:00 2001 From: kx1t Date: Fri, 13 Oct 2023 09:46:12 -0400 Subject: [PATCH] add Anywhere Map and Stats URL printing to logs --- rootfs/etc/s6-overlay/scripts/adsbx-stats | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rootfs/etc/s6-overlay/scripts/adsbx-stats b/rootfs/etc/s6-overlay/scripts/adsbx-stats index 0d64ff8..3ff355e 100755 --- a/rootfs/etc/s6-overlay/scripts/adsbx-stats +++ b/rootfs/etc/s6-overlay/scripts/adsbx-stats @@ -53,6 +53,13 @@ if ! pgrep readsb >/dev/null; then sleep 2 & wait $! fi -"${s6wrap[@]}" echo "invoking: /usr/local/bin/json-status" +# Let json-status start up, and then print the Anywhere Map and Anywhere Stats URLs to the container logs: +{ sleep 15 + AnywhereMap="$(curl -sSL https://www.adsbexchange.com/myip/ | grep "ADSBx Anywhere Map" | sed -n 's|.*\(https.*\)\" class.*|\1|p')" + AnywhereStats="$(curl -sSL https://www.adsbexchange.com/myip/ | grep "ADSBx Anywhere Stats" | sed -n 's|.*\(https.*\)\" class.*|\1|p')" + "${s6wrap[@]}" echo "Your AdsbExchange Anywhere Map URL is $AnywhereMap" + "${s6wrap[@]}" echo "Your AdsbExchange Anywhere Stats URL is $AnywhereStats" +} & +"${s6wrap[@]}" echo "invoking: /usr/local/bin/json-status" "${s6wrap[@]}" /usr/local/bin/json-status \ No newline at end of file