#!/bin/sh
#

# PROVIDE: REDLIB 
# REQUIRE: DAEMON
# KEYWORD: shutdown

$_rc_subr_loaded . /etc/rc.subr
. /usr/pkg/etc/redlib.conf

name="redlib"
rcvar=${name}
command="/usr/pkg/bin/${name}"
command_args="-a ${ADDRESS} -p ${PORT}"
pidfile="/var/run/${name}.pid"
logfile="/var/log/${name}.log"
required_files="/usr/pkg/etc/redlib.conf"

start_cmd="/usr/pkg/sbin/daemonize -p ${pidfile} -e ${logfile} $command $command_args"

load_rc_config $name
run_rc_command "$1"
