#!/sbin/openrc-run

: ${cfgfile:="/etc/fwknop/fwknopd.conf"}

pidfile="/var/run/fwknop/fwknopd.pid"
command=/usr/sbin/fwknopd
# $fwknopd_args is here for backward compatibility only
command_args="-f -c $cfgfile ${command_args:-$fwknopd_args}"
command_background="yes"

required_files="$cfgfile"

depend() {
	use logger
	after net
}

start_pre() {
	checkpath --directory ${pidfile%/*}
}
