From e970c06d364e5182b0143749bd1bfe9e19b7f2b3 Mon Sep 17 00:00:00 2001 From: 76rhodan Date: Sat, 27 Apr 2024 20:02:25 +0100 Subject: [PATCH 1/2] added a variable to turn off the extractor --- .../s6-overlay/s6-rc.d/iridium-extractor/run | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/rootfs/etc/s6-overlay/s6-rc.d/iridium-extractor/run b/rootfs/etc/s6-overlay/s6-rc.d/iridium-extractor/run index 501fb48..09f6910 100644 --- a/rootfs/etc/s6-overlay/s6-rc.d/iridium-extractor/run +++ b/rootfs/etc/s6-overlay/s6-rc.d/iridium-extractor/run @@ -1,10 +1,17 @@ #!/command/with-contenv bash #shellcheck shell=bash -echo "Starting iridium-extractor and iridium-parser" - -if [[ -n ${LOG_EXTRACTOR_STATS} ]]; then - python3 -u `which iridium-extractor` $EXTRACTOR_ARGS /opt/irdm.conf 2> >(stdbuf -o0 awk '{print "[iridium-extractor] " strftime("%Y/%m/%d %H:%M:%S", systime()) " " $0}') > >(pypy3 -u /opt/iridium-toolkit/iridium-parser.py $PARSER_ARGS -o zmq 2>&1 | stdbuf -o0 awk '{print "[iridium-parser] " strftime("%Y/%m/%d %H:%M:%S", systime()) " " $0}') +if [[ -n ${DISABLE_EXTRACTOR} ]]; then + echo "Not starting Extractor as it is disabled in the yml. You should know what you're doing." + sleep infinity + exit 0 else - python3 -u `which iridium-extractor` $EXTRACTOR_ARGS /opt/irdm.conf 2> >(stdbuf -o0 awk '{print "[iridium-extractor] " strftime("%Y/%m/%d %H:%M:%S", systime()) " " $0}' | grep WARNING) > >(pypy3 -u /opt/iridium-toolkit/iridium-parser.py $PARSER_ARGS -o zmq 2>&1 | stdbuf -o0 awk '{print "[iridium-parser] " strftime("%Y/%m/%d %H:%M:%S", systime()) " " $0}') + + echo "Starting iridium-extractor and iridium-parser" + + if [[ -n ${LOG_EXTRACTOR_STATS} ]]; then + python3 -u `which iridium-extractor` $EXTRACTOR_ARGS /opt/irdm.conf 2> >(stdbuf -o0 awk '{print "[iridium-extractor] " strftime("%Y/%m/%d %H:%M:%S", systime()) " " $0}') > >(pypy3 -u /opt/iridium-toolkit/iridium-parser.py $PARSER_ARGS -o zmq 2>&1 | stdbuf -o0 awk '{print "[iridium-parser] " strftime("%Y/%m/%d %H:%M:%S", systime()) " " $0}') + else + python3 -u `which iridium-extractor` $EXTRACTOR_ARGS /opt/irdm.conf 2> >(stdbuf -o0 awk '{print "[iridium-extractor] " strftime("%Y/%m/%d %H:%M:%S", systime()) " " $0}' | grep WARNING) > >(pypy3 -u /opt/iridium-toolkit/iridium-parser.py $PARSER_ARGS -o zmq 2>&1 | stdbuf -o0 awk '{print "[iridium-parser] " strftime("%Y/%m/%d %H:%M:%S", systime()) " " $0}') + fi fi From 75f4c4cff52730702553b718ecfacdab36b30d25 Mon Sep 17 00:00:00 2001 From: rhodan76 <53168891+76rhodan@users.noreply.github.com> Date: Sat, 27 Apr 2024 21:09:06 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8e4e214..85c8982 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ services: - /dev:/dev:rw - ./irdm.conf:/opt/irdm.conf:ro environment: +# - DISABLE_EXTRACTOR=true # - LOG_EXTRACTOR_STATS=true # - LOG_MAP=true # - EXTRACTOR_ARGS= -D 10