From ca3cc0dc33cd672cc1cd02e6f63c6c1d506efc31 Mon Sep 17 00:00:00 2001 From: 76rhodan Date: Wed, 1 May 2024 11:27:57 +0100 Subject: [PATCH 1/2] Added live-mt-map output env variables: ENABLE_MTPOS_MAP needs to be set to something to start the reassembler ENABLE_MTPOS_MAP_LOG needs to be set to something for log output (if there is any at all) --- .../s6-rc.d/iridium-reassembler-mtpos/run | 17 +++++++++++++++++ .../s6-rc.d/iridium-reassembler-mtpos/type | 1 + .../user/contents.d/iridium-reassembler-mtpos | 0 3 files changed, 18 insertions(+) create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/iridium-reassembler-mtpos/run create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/iridium-reassembler-mtpos/type create mode 100644 rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/iridium-reassembler-mtpos diff --git a/rootfs/etc/s6-overlay/s6-rc.d/iridium-reassembler-mtpos/run b/rootfs/etc/s6-overlay/s6-rc.d/iridium-reassembler-mtpos/run new file mode 100644 index 0000000..0d7f460 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/iridium-reassembler-mtpos/run @@ -0,0 +1,17 @@ +#!/command/with-contenv bash +#shellcheck shell=bash + +if [[ -n $ENABLE_MTPOS_MAP ]]; then + echo "Starting mtpos map reassembler" + cd /opt/iridium-toolkit/html + + if [[ -n $ENABLE_MTPOS_MAP_LOG ]]; then + pypy3 -u /opt/iridium-toolkit/reassembler.py -i zmq: -m live-mt-map 2>&1 | stdbuf -o0 awk '{print "[iridium-reassembler-map] " strftime("%Y/%m/%d %H:%M:%S", systime()) " " $0}' + else + pypy3 -u /opt/iridium-toolkit/reassembler.py -i zmq: -m live-mt-map &> /dev/null + fi +else + echo "mtpos map not enabled" + sleep infinity + exit 0 +fi diff --git a/rootfs/etc/s6-overlay/s6-rc.d/iridium-reassembler-mtpos/type b/rootfs/etc/s6-overlay/s6-rc.d/iridium-reassembler-mtpos/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/iridium-reassembler-mtpos/type @@ -0,0 +1 @@ +longrun diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/iridium-reassembler-mtpos b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/iridium-reassembler-mtpos new file mode 100644 index 0000000..e69de29 From a4157f6f61a9949cb3cf6fecb9940a1ef5d0287a Mon Sep 17 00:00:00 2001 From: 76rhodan Date: Wed, 1 May 2024 11:29:47 +0100 Subject: [PATCH 2/2] updated readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 85c8982..02d343f 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,8 @@ services: - /dev:/dev:rw - ./irdm.conf:/opt/irdm.conf:ro environment: +# - ENABLE_MTPOS_MAP=true +# - ENABLE_MTPOS_MAP_LOG=true # - DISABLE_EXTRACTOR=true # - LOG_EXTRACTOR_STATS=true # - LOG_MAP=true