#!/bin/sh
# PROVIDE: binlsrv
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable binlsrv:
#
# binlsrv_enable="YES"
# binlsrv_infdir="/path/to/inf/files"
#
. /etc/rc.subr
name="binlsrv"
rcvar=`set_rcvar`
load_rc_config "${name}"
# Set defaults
: ${binlsrv_enable:="NO"}
: ${binlsrv_infdir:="/usr/local/share/ris/inf"}
pidfile="/var/run/binlsrv.pid"
command="/usr/local/bin/python2.3"
command_args="/usr/local/share/ris/${name}.py -d"
required_dirs="$binlsrv_infdir"
start_precmd="binlsrv_start_precmd"
stop_postcmd="binlsrv_stop_postcmd"
binlsrv_start_precmd()
{
/usr/local/share/ris/infparser.py ${binlsrv_infdir}
}
binlsrv_stop_postcmd()
{
rm -f ${pidfile}
}
run_rc_command "$1"
syntax highlighted by Code2HTML, v. 0.9.1