Skip to content

Commit

Permalink
added a variable to turn off the extractor
Browse files Browse the repository at this point in the history
  • Loading branch information
76rhodan committed Apr 27, 2024
1 parent 951a3ce commit e970c06
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions rootfs/etc/s6-overlay/s6-rc.d/iridium-extractor/run
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e970c06

Please sign in to comment.