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"]
|
SHELL ["/bin/bash", "-x", "-o", "pipefail", "-c"]
|
||||||
RUN \
|
RUN \
|
||||||
|
|
|
@ -23,13 +23,13 @@ source /scripts/interpret_ultrafeeder_config
|
||||||
# Check if ADSBExchange is configured
|
# Check if ADSBExchange is configured
|
||||||
if ! grep -i adsbexchange.com <<< "$ULTRAFEEDER_CONFIG" >/dev/null 2>&1; then
|
if ! grep -i adsbexchange.com <<< "$ULTRAFEEDER_CONFIG" >/dev/null 2>&1; then
|
||||||
"${s6wrap[@]}" echo "AdsbExchange not configured - no stats package needed"
|
"${s6wrap[@]}" echo "AdsbExchange not configured - no stats package needed"
|
||||||
exec sleep infinity
|
stop_service
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if ADSBExchange stats are disabled
|
# Check if ADSBExchange stats are disabled
|
||||||
if chk_disabled "$ADSBX_STATS" ; then
|
if chk_disabled "$ADSBX_STATS" ; then
|
||||||
"${s6wrap[@]}" echo "AdsbExchange stats disabled"
|
"${s6wrap[@]}" echo "AdsbExchange stats disabled"
|
||||||
exec sleep infinity
|
stop_service
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# prep work:
|
# prep work:
|
||||||
|
@ -42,7 +42,7 @@ fi
|
||||||
if [[ ! -f /usr/local/bin/json-status ]]; then
|
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
|
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"
|
"${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
|
fi
|
||||||
chmod 755 /usr/local/bin/json-status
|
chmod 755 /usr/local/bin/json-status
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -42,13 +42,13 @@ declare -A pid_array
|
||||||
if [[ -z "${MLAT_CONFIG}" ]]
|
if [[ -z "${MLAT_CONFIG}" ]]
|
||||||
then
|
then
|
||||||
"${s6wrap[@]}" --args echo "Warning: MLAT_CONFIG not defined - MLAT will be disabled."
|
"${s6wrap[@]}" --args echo "Warning: MLAT_CONFIG not defined - MLAT will be disabled."
|
||||||
exec sleep infinity
|
stop_service
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${MLAT_USER}" ]] && [[ -z "${UUID}" ]]
|
if [[ -z "${MLAT_USER}" ]] && [[ -z "${UUID}" ]]
|
||||||
then
|
then
|
||||||
"${s6wrap[@]}" --args echo "ERROR: either UUID or MLAT_USER must be defined - MLAT will be disabled."
|
"${s6wrap[@]}" --args echo "ERROR: either UUID or MLAT_USER must be defined - MLAT will be disabled."
|
||||||
exec sleep infinity
|
stop_service
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function check_gpsd() {
|
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
|
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"
|
"${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
|
fi
|
||||||
|
|
||||||
if chk_enabled "${MLATHUB_DISABLE}"; then
|
if chk_enabled "${MLATHUB_DISABLE}"; then
|
||||||
"${s6wrap[@]}" --args echo "MLATHUB is disabled."
|
"${s6wrap[@]}" --args echo "MLATHUB is disabled."
|
||||||
exec sleep infinity
|
stop_service
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build the readsb command line based on options
|
# Build the readsb command line based on options
|
||||||
|
|
Loading…
Reference in a new issue