27 lines
565 B
Bash
Executable File
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" "$@"
|