Skip to content

Commit

Permalink
adsbx stats lower priority (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredclausen authored Oct 4, 2024
2 parents 467bf81 + 3347238 commit 1c47b76
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ RUN \
{ [[ "${VERSION_BRANCH:0:1}" == "#" ]] && VERSION_BRANCH="main" || true; } && \
echo "$(TZ=UTC date +%Y%m%d-%H%M%S)_$(curl -ssL "https://api.github.com/repos/$VERSION_REPO/commits/$VERSION_BRANCH" | awk '{if ($1=="\"sha\":") {print substr($2,2,7); exit}}')_$VERSION_BRANCH" > /.CONTAINER_VERSION && \
# Clean up:
apt-get remove -q -y "${TEMP_PACKAGES[@]}" && \
apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \
apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y "${TEMP_PACKAGES[@]}" && \
apt-get clean -q -y && \
# test mlat-client
/usr/bin/mlat-client --help > /dev/null && \
Expand Down
3 changes: 3 additions & 0 deletions rootfs/etc/s6-overlay/scripts/mlat-client
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ source /scripts/interpret_ultrafeeder_config

s6wrap=(s6wrap --quiet --timestamps --prepend="$SCRIPT_NAME")

# run with slightly lower priority
renice 5 $$ || true

"${s6wrap[@]}" --args echo "Started as an s6 service"

MLAT_CMD="/usr/bin/mlat-client"
Expand Down
3 changes: 3 additions & 0 deletions rootfs/usr/local/bin/adsbexchange-json-status
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ REMOTE_URL="https://adsbexchange.com/api/receive/"

REMOTE_HOST=$( echo $REMOTE_URL | awk -F'/' '{print $3}' )

# run with lowest priority
renice 20 $$ || true

# Set this to '0' if you don't want this script to ever try to self-cache DNS.
# Default is on, but script will automatically not cache if resolver is localhost, or if curl version is too old.
DNS_CACHE=1
Expand Down

0 comments on commit 1c47b76

Please sign in to comment.