mirror of
https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git
synced 2024-11-21 13:20:11 +00:00
stop unneeded s6 services instead of exec sleep inf (#126)
Dockerfile: fix case
This commit is contained in:
parent
36b49854b7
commit
de632e4828
4 changed files with 8 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
|||
FROM ghcr.io/sdr-enthusiasts/docker-baseimage:mlatclient as buildimage
|
||||
FROM ghcr.io/sdr-enthusiasts/docker-baseimage:mlatclient AS buildimage
|
||||
|
||||
SHELL ["/bin/bash", "-x", "-o", "pipefail", "-c"]
|
||||
RUN \
|
||||
|
|
|
@ -23,13 +23,13 @@ source /scripts/interpret_ultrafeeder_config
|
|||
# Check if ADSBExchange is configured
|
||||
if ! grep -i adsbexchange.com <<< "$ULTRAFEEDER_CONFIG" >/dev/null 2>&1; then
|
||||
"${s6wrap[@]}" echo "AdsbExchange not configured - no stats package needed"
|
||||
exec sleep infinity
|
||||
stop_service
|
||||
fi
|
||||
|
||||
# Check if ADSBExchange stats are disabled
|
||||
if chk_disabled "$ADSBX_STATS" ; then
|
||||
"${s6wrap[@]}" echo "AdsbExchange stats disabled"
|
||||
exec sleep infinity
|
||||
stop_service
|
||||
fi
|
||||
|
||||
# prep work:
|
||||
|
@ -42,7 +42,7 @@ fi
|
|||
if [[ ! -f /usr/local/bin/json-status ]]; then
|
||||
if ! curl -sSL -o /usr/local/bin/json-status https://raw.githubusercontent.com/sdr-enthusiasts/docker-adsb-ultrafeeder/main/downloads/adsbexchange-json-status; then
|
||||
"${s6wrap[@]}" echo "ERROR: AdsbExchange configured, but cannot download stats package! AdsbExchange will be fed but stats will not be available"
|
||||
exec sleep infinity
|
||||
stop_service
|
||||
fi
|
||||
chmod 755 /usr/local/bin/json-status
|
||||
fi
|
||||
|
|
|
@ -42,13 +42,13 @@ declare -A pid_array
|
|||
if [[ -z "${MLAT_CONFIG}" ]]
|
||||
then
|
||||
"${s6wrap[@]}" --args echo "Warning: MLAT_CONFIG not defined - MLAT will be disabled."
|
||||
exec sleep infinity
|
||||
stop_service
|
||||
fi
|
||||
|
||||
if [[ -z "${MLAT_USER}" ]] && [[ -z "${UUID}" ]]
|
||||
then
|
||||
"${s6wrap[@]}" --args echo "ERROR: either UUID or MLAT_USER must be defined - MLAT will be disabled."
|
||||
exec sleep infinity
|
||||
stop_service
|
||||
fi
|
||||
|
||||
function check_gpsd() {
|
||||
|
|
|
@ -31,12 +31,12 @@ fi
|
|||
|
||||
if [[ -z "${MLAT_CONFIG}" ]] && [[ -z "$MLATHUB_NET_CONNECTOR" ]] && [[ ${#MLATHUB_CONF_ARR[@]} == 0 ]] && ! chk_enabled "${MLATHUB_ENABLE}"; then
|
||||
"${s6wrap[@]}" --args echo "No MLAT servers have been defined in MLAT_CONFIG and no external sources have been defined in MLATHUB_NET_CONNECTOR - no need to start MLATHUB"
|
||||
exec sleep infinity
|
||||
stop_service
|
||||
fi
|
||||
|
||||
if chk_enabled "${MLATHUB_DISABLE}"; then
|
||||
"${s6wrap[@]}" --args echo "MLATHUB is disabled."
|
||||
exec sleep infinity
|
||||
stop_service
|
||||
fi
|
||||
|
||||
# Build the readsb command line based on options
|
||||
|
|
Loading…
Reference in a new issue