diff --git a/README.md b/README.md index e86aca3..fde6916 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 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