1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00
freebsd-ports/devel/py-mwlib/files/nslave.in
Wen Heping 42bfb6237e - Fix dependencies [1]
- Add rc scripts [1]
- Reset maintainer to ports@

PR:		193784 [1]
Submitted by:	swills@ [1]
2014-10-05 13:29:15 +00:00

39 lines
677 B
Bash

#! /bin/sh
#
# $FreeBSD$
#
# 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"