Something
public text v1 · immutable#!/bin/sh
#
# PROVIDE: foo
# REQUIRE: NETWORKING
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable foo:
#
#foo_enable="YES"
#
#
. /etc/rc.subr
name=foo
rcvar=`set_rcvar`
command="/usr/local/sbin/foo"
required_files=/usr/local/etc/nrpe.cfg
pidfile=/var/run/${name}.pid
# set defaults
foo_enable=${foo_enable:-"NO"}
foo_flags=${foo_flags:-""}
load_rc_config ${name}
run_rc_command "$1"