Files
hamview/cmd/hamview-receiver/entrypoint.sh
maze 3106b2cf45
All checks were successful
Test and build / Test and lint (push) Successful in 1m14s
Test and build / Build collector (push) Successful in 1m32s
Test and build / Build receiver (push) Successful in 1m48s
Add bash
2026-02-24 15:51:31 +01:00

27 lines
642 B
Bash
Executable File

#!/bin/bash
RECEIVER_FLAGS=()
RECEIVER_CONFIG="${RECEIVER_CONFIG:-/app/config/receiver-${RECEIVER_PROTOCOL}.yaml}"
[ -n "${RECEIVER_DEBUG}" ] && RECEIVER_FLAGS=("${RECEIVER_FLAGS[@]}" "--debug")
[ -n "${RECEIVER_TRACE}" ] && RECEIVER_FLAGS=("${RECEIVER_FLAGS[@]}" "--trace")
run() {
case "${RECEIVER_PROTOCOL}" in
"") exec "/app/hamview-receiver" help ;;
*) exec "/app/hamview-receiver" \
"${RECEIVER_FLAGS[@]}" \
--config "${RECEIVER_CONFIG}" \
"${RECEIVER_PROTOCOL}" ;;
esac
}
case "$@" in
"")
run
;;
*)
exec "/bin/sh" -c "$@"
;;
esac