26 lines
854 B
Bash
Executable File
26 lines
854 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
CONFIG_FILE="${INTER_RP_METRICS_CONFIG:-./inter-rp-metrics.env}"
|
|
if [[ -f "$CONFIG_FILE" ]]; then
|
|
# shellcheck disable=SC1090
|
|
source "$CONFIG_FILE"
|
|
fi
|
|
|
|
RPKI_INTER_RP_METRICS_BIN="${RPKI_INTER_RP_METRICS_BIN:-./bin/rpki_inter_rp_metrics}"
|
|
OURS_RUN_ROOT="${OURS_RUN_ROOT:?OURS_RUN_ROOT is required}"
|
|
PEER_ROOT="${PEER_ROOT:-/root/inter-rp-aggregator/synced-from-200}"
|
|
LISTEN="${INTER_RP_METRICS_LISTEN:-0.0.0.0:9557}"
|
|
POLL_SECS="${INTER_RP_METRICS_POLL_SECS:-30}"
|
|
INSTANCE="${INTER_RP_METRICS_INSTANCE:-remote231-inter-rp}"
|
|
LOG_DIR="${INTER_RP_METRICS_LOG_DIR:-./logs}"
|
|
|
|
mkdir -p "$LOG_DIR"
|
|
exec "$RPKI_INTER_RP_METRICS_BIN" \
|
|
--ours-run-root "$OURS_RUN_ROOT" \
|
|
--peer-root "$PEER_ROOT" \
|
|
--listen "$LISTEN" \
|
|
--poll-secs "$POLL_SECS" \
|
|
--instance "$INSTANCE" \
|
|
>>"$LOG_DIR/inter-rp-metrics.log" 2>&1
|