#!/bin/sh

# PROVIDE: kadnode
# REQUIRE: SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown

. /etc/rc.subr

name=kadnode
rcvar=kadnode_enable

pidfile="/var/run/kadnode.pid"
required_files="%%PREFIX%%/etc/kadnode/kadnode.conf"
configfile="%%PREFIX%%/etc/kadnode/kadnode.conf"
command="%%PREFIX%%/bin/kadnode"

command_args="--config $configfile --pidfile $pidfile --daemon"

load_rc_config $name
: ${kadnode_enable:=yes}
run_rc_command "$1"
