#! /bin/sh # # $FreeBSD: head/devel/py-mwlib/files/nslave.in 370065 2014-10-05 13:29:15Z wen $ # # PROVIDE: nslave # REQUIRE: DAEMON # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable nslave: # #nslave_enable="YES" . /etc/rc.subr name="nslave" rcvar="nslave_enable" load_rc_config $name : ${nslave_user:=www} : ${nslave_group:=www} : ${nslave_enable:=NO} pidfile="/var/run/${name}.pid" command="/usr/sbin/daemon" command_args="-c -f -p ${pidfile} %%PREFIX%%/bin/nslave ${nslave_args}" command_interpreter="%%PYTHON_CMD%%" procname="%%PREFIX%%/bin/nslave" start_precmd=nslave_pre_start nslave_pre_start() { /usr/bin/install -o ${nslave_user} -g ${nslave_group} -m 644 /dev/null ${pidfile} } run_rc_command "$1"