mirror of
https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git
synced 2024-11-24 06:40:09 +00:00
appname to basename (#50)
This commit is contained in:
commit
1fc7e41202
1 changed files with 8 additions and 8 deletions
|
@ -211,12 +211,12 @@ do
|
||||||
# run this Mlat_client instance in the background:
|
# run this Mlat_client instance in the background:
|
||||||
#shellcheck disable=SC2069,SC2086
|
#shellcheck disable=SC2069,SC2086
|
||||||
if [[ -z "${LOGLEVEL}" ]] || [[ "${LOGLEVEL,,}" == "verbose" ]]; then
|
if [[ -z "${LOGLEVEL}" ]] || [[ "${LOGLEVEL,,}" == "verbose" ]]; then
|
||||||
"${s6wrap[@]}" --prepend="${APPNAME}][${servername}" --args echo "starting: ${MLAT_CMD} ${MLAT_PARAM[*]}"
|
"${s6wrap[@]}" --prepend="$(basename "$0")][${servername}" --args echo "starting: ${MLAT_CMD} ${MLAT_PARAM[*]}"
|
||||||
"${s6wrap[@]}" --prepend="${APPNAME}][${servername}" --args ${execstring} &
|
"${s6wrap[@]}" --prepend="$(basename "$0")][${servername}" --args ${execstring} &
|
||||||
elif [[ "${LOGLEVEL,,}" == "error" ]]; then
|
elif [[ "${LOGLEVEL,,}" == "error" ]]; then
|
||||||
"${s6wrap[@]}" --ignore-stdout --prepend="${APPNAME}][${servername}" --args ${execstring} &
|
"${s6wrap[@]}" --ignore-stdout --prepend="$(basename "$0")][${servername}" --args ${execstring} &
|
||||||
elif [[ "${LOGLEVEL,,}" == "none" ]]; then
|
elif [[ "${LOGLEVEL,,}" == "none" ]]; then
|
||||||
"${s6wrap[@]}" --ignore-stderr --ignore-stdout --prepend="${APPNAME}][${servername}" --args ${execstring} &
|
"${s6wrap[@]}" --ignore-stderr --ignore-stdout --prepend="$(basename "$0")][${servername}" --args ${execstring} &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# pid_array is indexed by the PID of each mlat_client and contains the MLAT_PARAMs for that instance
|
# pid_array is indexed by the PID of each mlat_client and contains the MLAT_PARAMs for that instance
|
||||||
|
@ -242,17 +242,17 @@ do
|
||||||
servername="$(awk '{print $4}' <<< "${pid_array[$mlat_pid]}")"
|
servername="$(awk '{print $4}' <<< "${pid_array[$mlat_pid]}")"
|
||||||
servername="${servername%%:*}"
|
servername="${servername%%:*}"
|
||||||
|
|
||||||
[[ "${LOGLEVEL,,}" != "none" ]] && "${s6wrap[@]}" --prepend="${APPNAME}[${servername}" --args echo "MLAT_Client ${servername} exited. Attempting to restart." || true
|
[[ "${LOGLEVEL,,}" != "none" ]] && "${s6wrap[@]}" --prepend="$(basename "$0")[${servername}" --args echo "MLAT_Client ${servername} exited. Attempting to restart." || true
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
execstring="$(echo ${MLAT_CMD} ${pid_array[$mlat_pid]} | xargs)"
|
execstring="$(echo ${MLAT_CMD} ${pid_array[$mlat_pid]} | xargs)"
|
||||||
|
|
||||||
#shellcheck disable=SC2069,SC2086
|
#shellcheck disable=SC2069,SC2086
|
||||||
if [[ -z "${LOGLEVEL}" ]] || [[ "${LOGLEVEL,,}" == "verbose" ]]; then
|
if [[ -z "${LOGLEVEL}" ]] || [[ "${LOGLEVEL,,}" == "verbose" ]]; then
|
||||||
"${s6wrap[@]}" --prepend="${APPNAME}][${servername}" --args ${execstring} &
|
"${s6wrap[@]}" --prepend="$(basename "$0")][${servername}" --args ${execstring} &
|
||||||
elif [[ "${LOGLEVEL,,}" == "error" ]]; then
|
elif [[ "${LOGLEVEL,,}" == "error" ]]; then
|
||||||
"${s6wrap[@]}" --ignore-stdout --prepend="${APPNAME}][${servername}" --args ${execstring} &
|
"${s6wrap[@]}" --ignore-stdout --prepend="$(basename "$0")][${servername}" --args ${execstring} &
|
||||||
elif [[ "${LOGLEVEL,,}" == "none" ]]; then
|
elif [[ "${LOGLEVEL,,}" == "none" ]]; then
|
||||||
"${s6wrap[@]}" --ignore-stderr --ignore-stdout --prepend="${APPNAME}][${servername}" --args ${execstring} &
|
"${s6wrap[@]}" --ignore-stderr --ignore-stdout --prepend="$(basename "$0")][${servername}" --args ${execstring} &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pid_array[$!]="${pid_array[${mlat_pid}]}"
|
pid_array[$!]="${pid_array[${mlat_pid}]}"
|
||||||
|
|
Loading…
Reference in a new issue