#!/sbin/openrc-run

: ${HEPLIFY_OPTS:="-i lo"}

description="Multi-Protocol Go HEP Capture Agent"
command=/usr/bin/heplify
command_args="$HEPLIFY_OPTS -p /var/log/heplify"
command_background=yes
pidfile="/run/heplify/${RC_SVCNAME}.pid"

depend() {
	need net
	after firewall
}

start_pre() {
	checkpath --directory --owner $command_user:$command_group ${pidfile%/*} /var/log/heplify
}
