#!/usr/bin/env /lib/runit/invoke-run

set -e

. /etc/ark/monitor-config

# logging only captures stdout, so merge stderr in with it
exec 2>&1

SCAMPER_PORT=${SCAMPER_PORT:-8745}
SCAMPER_PPS=${SCAMPER_PPS:-100}

echo "Starting ark-activity-v6-prober-scamper..."
exec chpst -u ark /usr/bin/scamper -P "$SCAMPER_PORT" -p "$SCAMPER_PPS" -M "$ARK_MONITOR"
