panda-rpki/scripts/runtime/entrypoint.sh
yuyr 15c8de82ba
Some checks failed
ci / rust (push) Has been cancelled
ci / docker-runtime (push) Has been cancelled
freeze initial panda-rpki staging
2026-09-01 12:13:53 +08:00

27 lines
565 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
BIN_DIR="${BIN_DIR:-/opt/panda-rpki-validator/bin}"
VALIDATOR_BIN="$BIN_DIR/panda-rpki-validator"
if [[ ! -x "$VALIDATOR_BIN" ]]; then
echo "panda-rpki-validator: missing executable: $VALIDATOR_BIN" >&2
exit 127
fi
if [[ "${1:-}" == "run" || "${1:-}" == "run-validator" ]]; then
shift
exec "/opt/panda-rpki-validator/run_validator.sh" "$@"
fi
if [[ "${1:-}" == "daemon" ]]; then
shift
exec "$BIN_DIR/panda-rpki-validator-daemon" "$@"
fi
if [[ "$#" -eq 0 ]]; then
set -- --help
fi
exec "$VALIDATOR_BIN" "$@"