ports/www/nginx-devel/files/nginx.sh
Sergey A. Osokin bd4066ee45 Add nginx (Engine X) - small and fast WWW-server.
Special thanks to:	marck
Some ideas from PR:	72830
2004-10-21 17:54:45 +00:00

32 lines
640 B
Bash

#!/bin/sh
# $FreeBSD$
# PROVIDE: nginx
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: FreeBSD shutdown
# Define these apache_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/apache
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
nginx_enable=${nginx_enable-"NO"}
nginx_flags=${nginx_flags-""}
nginx_pidfile=${nginx_pidfile-"/var/run/nginx.pid"}
. %%RC_SUBR%%
name="nginx"
rcvar=`set_rcvar`
command="%%PREFIX%%/sbin/nginx"
load_rc_config $name
pidfile="${nginx_pidfile}"
start_cmd="echo \"Starting ${name}.\"; /usr/bin/limits -U www ${command} ${nginx_flags}"
run_rc_command "$1"